|
||||||||||
| 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. |
Certificate |
getCertificate()
This is used to acquire the SSL certificate used when the server is using a HTTPS connection. |
int |
read(ByteBuffer buffer)
This is used to perform a non-blocking read on the transport. |
void |
write(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, getTrace |
| Method Detail |
|---|
Certificate getCertificate()
throws IOException
IOException
int read(ByteBuffer buffer)
throws IOException
buffer - this is the buffer to append the bytes to
IOException
void write(ByteBuffer buffer)
throws IOException
buffer - this is the buffer of bytes to send to the client
IOException
void flush()
throws IOException
IOException
void close()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||