public interface Session
Session
object represents a simple WebSocket session
that contains the connection handshake details and the actual socket.
In order to determine how the session should be interacted with the
protocol is conveniently exposed, however all attributes of the
original HTTP request are available.FrameChannel
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(Object key)
This is used as a shortcut for acquiring attributes for the
response.
|
Map |
getAttributes()
This can be used to retrieve the response attributes.
|
FrameChannel |
getChannel()
Provides a
FrameChannel that can be used to communicate
with the connected client. |
Request |
getRequest()
Provides the
Request used to initiate the session. |
Response |
getResponse()
Provides the
Response used to establish the session
with the remote client. |
Map getAttributes()
Object getAttribute(Object key)
Map
in order to retrieve the attribute directly from that object.
The attributes contain data specific to the response.key
- this is the key of the attribute to acquireFrameChannel getChannel()
FrameChannel
that can be used to communicate
with the connected client. Communication is full duplex and also
asynchronous through the use of a FrameListener
that
can be registered with the channel.Request getRequest()
Request
used to initiate the session.
This is useful in establishing the identity of the user, acquiring
an security information and also for determining the request path
that was used, which be used to establish context.Response getResponse()
Response
used to establish the session
with the remote client. This is useful in establishing the protocol
used to create the session and also for determining various other
useful contextual information.Copyright © 2016. All rights reserved.