public class TransportChannel extends Object implements Channel
TransportChannel provides a means to deliver and
receive content over a transport. This essentially provides two
adapters which enable simpler communication with the underlying
transport. They hide the complexities involved with buffering and
resetting data written to and read from the socket.TransportProcessor| Constructor and Description |
|---|
TransportChannel(Transport transport)
Constructor for the
TransportChannel object. |
| Modifier and Type | Method and Description |
|---|---|
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. |
Certificate |
getCertificate()
This is used to acquire the SSL certificate used for security.
|
ByteCursor |
getCursor()
This provides a
ByteCursor for this channel. |
SocketChannel |
getSocket()
This is the connected socket channel associated with this.
|
Trace |
getTrace()
This gets the
Trace object associated with the
channel. |
ByteWriter |
getWriter()
This provides a
ByteWriter for 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.
|
public TransportChannel(Transport transport) throws IOException
TransportChannel object. The
transport channel basically wraps a channel and provides a
means to send and receive data using specialized adapters.
These adapters provide a simpler means for communicating over
the network to the connected client.transport - this is the underlying transport to be usedIOExceptionpublic boolean isSecure()
public Certificate getCertificate()
getCertificate in interface Channelpublic 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.public SocketChannel getSocket()
public 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.getAttributes in interface Channelpublic ByteCursor getCursor()
ByteCursor for this channel. The
cursor provides a seekable 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.public ByteWriter getWriter()
ByteWriter 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.public void close()
Copyright © 2024. All rights reserved.