|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Transport
Common transport interface. Provides ability to read and write the messages.
Method Summary | |
---|---|
void |
close()
Close the transport. |
String |
getAddress()
Getter for address value. |
int |
getPort()
Getter for port value. |
boolean |
isBlockingSocket()
|
boolean |
isOpen()
Returns true if, transport is open. |
void |
open()
Open the transport. |
int |
read(byte[] buffer)
Transport dependent read method. |
int |
read(byte[] buffer,
int offset,
int length)
Transport dependent read method. |
int |
read(ByteBuffer buffer)
|
int |
read(ByteBuffer buffer,
int offset,
int length)
|
void |
waitUntilReadyToWrite()
|
void |
write(byte[] message)
Transport dependent write method. |
int |
write(byte[] message,
int offset,
int length)
Transport dependent write method. |
int |
write(ByteBuffer message)
|
int |
write(ByteBuffer message,
int offset,
int length)
|
Method Detail |
---|
boolean isBlockingSocket()
void write(byte[] message) throws IOException
message
- actual message
IOException
- if unable to writeint write(ByteBuffer message) throws IOException
IOException
int write(byte[] message, int offset, int length) throws IOException
message
- actual messageoffset
- the offset in bufferlength
- the num of bytes to write
IOException
- if unable to writeint write(ByteBuffer message, int offset, int length) throws IOException
IOException
void waitUntilReadyToWrite() throws IOException
IOException
int read(byte[] buffer, int offset, int length) throws IOException
buffer
- holder for read bytesoffset
- in bufferlength
- maximum bytes to be read
IOException
- if unable to readint read(ByteBuffer buffer, int offset, int length) throws IOException
IOException
int read(byte[] buffer) throws IOException
buffer
- holder for read bytes
IOException
- if unable to readint read(ByteBuffer buffer) throws IOException
IOException
String getAddress()
int getPort()
void open() throws IOException
IOException
- - throws if error occurredvoid close() throws IOException
IOException
- - throws if error occurredboolean isOpen()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |