|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simpleframework.transport.SocketWrapper
public class SocketWrapper
This is a SocketWrapper objects that represents a TCP
socket connections. This contains a map that allows attributes to be
associated with the client connection. Attributes such as security
certificates or other transport related details can be exposed to
the Request using the socket attribute map.
This provides the connected SocketChannel that can be
used to receive and response to HTTP requests. The socket channel
must be selectable and in non-blocking mode. If the socket is not
in a non-blocking state the connection will not be processed.
| Constructor Summary | |
|---|---|
SocketWrapper(SocketChannel channel,
Trace trace)
This creates a SocketWrapper from a socket channel. |
|
SocketWrapper(SocketChannel channel,
Trace trace,
SSLEngine engine)
This creates a SecureSocket from a socket channel. |
|
| Method Summary | |
|---|---|
Map |
getAttributes()
This method is used to get the Map of attributes
by this socket. |
SocketChannel |
getChannel()
This method is used to acquire the SocketChannel
for the connection. |
SSLEngine |
getEngine()
This is used to acquire the SSL engine used for HTTPS. |
Trace |
getTrace()
This is used to acquire the trace object that is associated with the socket. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocketWrapper(SocketChannel channel,
Trace trace)
SocketWrapper from a socket channel.
Any implementations of the object may use this constructor to
ensure that all the data is initialized.
channel - the socket channel that is used as the transporttrace - used to trace specific events for the socket
public SocketWrapper(SocketChannel channel,
Trace trace,
SSLEngine engine)
SecureSocket from a socket channel.
Any implementations of the object may use this constructor to
ensure that all the data is initialized.
channel - the socket channel that is used as the transporttrace - used to trace specific events for the socketengine - this is the SSL engine used for secure transport| Method Detail |
|---|
public Trace getTrace()
getTrace in interface Socketpublic SSLEngine getEngine()
getEngine in interface Socketpublic SocketChannel getChannel()
SocketChannel
for the connection. This allows the server to acquire the input
and output streams with which to communicate. It can also be
used to configure the connection and perform various network
operations that could otherwise not be performed.
getChannel in interface Socketpublic Map getAttributes()
Map of attributes
by this socket. The attributes map is used to maintain details
about the connection. Information such as security credentials
to client details can be placed within the attribute map.
getAttributes in interface Socket
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||