|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Transport
The Transport
interface represents a low level means
to deliver content to the connected client. Typically this will
be a connected, non-blocking, TCP connection. However, for tests
and other purposes this may be adapted. The general contract of
the transport is that it provides non-blocking reads and blocking
writes. Blocking writes are required to ensure that memory does
not build up in output buffers during high load periods.
Method Summary | |
---|---|
void |
close()
This is used to close the transport and the underlying socket. |
void |
flush()
This method is used to flush the contents of the buffer to the client. |
int |
read(java.nio.ByteBuffer buffer)
This is used to perform a non-blocking read on the transport. |
void |
write(java.nio.ByteBuffer buffer)
This method is used to deliver the provided buffer of bytes to the underlying transport. |
Methods inherited from interface org.simpleframework.transport.Socket |
---|
getAttributes, getChannel, getEngine |
Method Detail |
---|
int read(java.nio.ByteBuffer buffer) throws java.io.IOException
buffer
- this is the buffer to append the bytes to
java.io.IOException
void write(java.nio.ByteBuffer buffer) throws java.io.IOException
buffer
- this is the buffer of bytes to send to the client
java.io.IOException
void flush() throws java.io.IOException
java.io.IOException
void close() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |