public interface Transport extends Socket
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.| Modifier and Type | Method and Description |
|---|---|
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.
|
getAttributes, getChannel, getEngine, getTraceCertificate getCertificate() throws IOException
IOExceptionint read(ByteBuffer buffer) throws IOException
buffer - this is the buffer to append the bytes toIOExceptionvoid write(ByteBuffer buffer) throws IOException
buffer - this is the buffer of bytes to send to the clientIOExceptionvoid flush()
throws IOException
IOExceptionvoid close()
throws IOException
IOExceptionCopyright © 2025. All rights reserved.