|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Channel
The Channel interface represents a connected channel
through which data can be sent and received. Typically a channel
will have a connected TCP socket, which can be used to determine
when the channel is read ready, and write ready. A channel can
also contain a bag of attributes used to describe the connection.
Reading and writing to a channel is performed using two special
interfaces. The first is the Cursor object which is
used to read data from the channel in a non-blocking manner. This
can also be used to reset data if it has read too much. To write
the Sender can be used, this provides a blocking
interface much like a conventional output stream.
| Method Summary | |
|---|---|
void |
close()
Because the channel represents a duplex means of communication there needs to be a means to close it down. |
Map |
getAttributes()
This returns the Map of attributes used to hold
connection information for the channel. |
Cursor |
getCursor()
This provides the Cursor for this channel. |
SSLEngine |
getEngine()
This is used to acquire the SSL engine used for security. |
Sender |
getSender()
This provides the Sender for the channel. |
SocketChannel |
getSocket()
This is the connected socket channel associated with this. |
Trace |
getTrace()
This gets the Trace object associated with the
channel. |
boolean |
isSecure()
This is used to determine if the channel is secure and that data read from and data written to the request is encrypted. |
| Method Detail |
|---|
boolean isSecure()
SocketChannel getSocket()
SSLEngine getEngine()
Trace getTrace()
Trace object associated with the
channel. The trace is used to log various events for the life
of the transaction such as low level read and write events
as well as milestone events and errors.
Cursor getCursor()
Cursor for this channel. The
cursor provides a resettable view of the input buffer and will
allow the server kernel to peek into the input buffer without
having to take the data from the input. This allows overflow
to be pushed back on to the cursor for subsequent reads.
Sender getSender()
Sender for the channel. This is
used to provide a blocking output mechanism for the channel.
Enabling blocking reads ensures that output buffering can be
limited to an extent, which ensures that memory remains low at
high load periods. Writes to the sender may result in the data
being copied and queued until the socket is write ready.
Map getAttributes()
Map of attributes used to hold
connection information for the channel. The attributes here
are taken from the pipeline attributes and may contain details
such as SSL certificates or other such useful information.
void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||