| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final ClassLoader | |
| private volatile MessageHandler | |
| private static final byte[] | |
| private static final int | |
| private final EndpointConfig | |
| private Map | |
| private final String | |
| private final String | |
| private static AtomicLong | |
| private volatile long | |
| private volatile long | |
| private final Endpoint | |
| private final Log | |
| private volatile int | |
| private volatile long | |
| private volatile int | |
| private final List | |
| private final Map | |
| private volatile MessageHandler. | |
| private final String | |
| private final RemoteEndpoint. | |
| private final RemoteEndpoint. | |
| private final Map | |
| private final URI | |
| private static final boolean | |
| private final boolean | |
| private volatile Long | |
| private static final StringManager | |
| private AtomicReference | |
| private final String | |
| private volatile MessageHandler | |
| private final Principal | |
| private final Map | |
| private final WsWebSocketContainer | |
| private WsFrameBase | |
| private final WsRemoteEndpointImplBase |
| Access | Constructor and Description |
|---|---|
| public | WsSession(ClientEndpointHolder
The end point managed by this code clientEndpointHolder, WsRemoteEndpointImplBase The other / remote end point wsRemoteEndpoint, WsWebSocketContainer The container that created this session wsWebSocketContainer, List<Extension> The agreed extensions to use for this session negotiatedExtensions, String The agreed sub-protocol to use for this session subProtocol, Map<String, String> The path parameters associated with the request that initiated this session or
pathParameters, boolean null if this is a client sessionWas this session initiated over a secure connection? secure, ClientEndpointConfig The configuration information for the client end point clientEndpointConfig)Creates a new WebSocket session for communication between the provided client and remote end points. |
| public | WsSession(WsRemoteEndpointImplBase
The other / remote end point wsRemoteEndpoint, WsWebSocketContainer The container that created this session wsWebSocketContainer, URI The URI used to connect to this end point or requestUri, Map<String, List<String>> null if this is a client
sessionThe parameters associated with the request that initiated this session or
requestParameterMap, String null if this is a client sessionThe query string associated with the request that initiated this session or
queryString, Principal null if this is a client sessionThe principal associated with the request that initiated this session or
userPrincipal, String null if this is a client sessionThe HTTP session ID associated with the request that initiated this session or
httpSessionId, List<Extension> null if this is a client sessionThe agreed extensions to use for this session negotiatedExtensions, String The agreed sub-protocol to use for this session subProtocol, Map<String, String> The path parameters associated with the request that initiated this session or
pathParameters, boolean null if this is a client sessionWas this session initiated over a secure connection? secure, ServerEndpointConfig The configuration information for the server end point serverEndpointConfig)Creates a new WebSocket session for communication between the provided server and remote end points. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addMessageHandler(MessageHandler
The message handler for a incoming message listener)Implements jakarta. Registers a |
| public <T> void | addMessageHandler(Class<T>
The Class that implements T clazz, MessageHandler.The message handler for a incoming message handlerImplements jakarta. Registers a |
| public <T> void | addMessageHandler(Class<T>
The Class that implements T clazz, MessageHandler.The message handler for a incoming message handlerImplements jakarta. Registers a |
| protected static void | appendCloseReasonWithTruncation(ByteBuffer
The message msg, String The reason reason)Use protected so unit tests can access this method directly. |
| protected void | |
| protected void | |
| private void | |
| public void | close()
Implements jakarta. Close the connection to the remote end point using the code
|
| public void | close(CloseReason
The reason the WebSocket session is being closed. closeReason)Implements jakarta. Close the connection to the remote end point using the specified code and reason phrase. |
| private void | |
| private void | |
| public void | doClose(CloseReason
The close reason to pass to the remote endpoint closeReasonMessage, CloseReason The close reason to pass to the local endpoint closeReasonLocal)WebSocket 1.0. |
| public void | doClose(CloseReason
The close reason to pass to the remote endpoint closeReasonMessage, CloseReason The close reason to pass to the local endpoint closeReasonLocal, boolean Should the socket be closed immediately rather than waiting for the server to respond closeSocket)WebSocket 1.0. |
| private void | |
| private void | |
| public RemoteEndpoint. | |
| public RemoteEndpoint. | |
| protected MessageHandler | |
| public WebSocketContainer | getContainer()
Implements jakarta. Get the container that created this session. |
| public String | |
| public String | |
| public InstanceManager | |
| public Endpoint | |
| public int | getMaxBinaryMessageBufferSize()
Implements jakarta. Get the current maximum buffer size for binary messages. |
| public long | getMaxIdleTimeout()
Implements jakarta. Get the idle timeout for this session. |
| private long | |
| private long | |
| public int | getMaxTextMessageBufferSize()
Implements jakarta. Get the maximum buffer size for text messages. |
| public Set | |
| public List | |
| public String | |
| public Set | getOpenSessions()
Implements jakarta. Obtain the set of open sessions associated with the same local endpoint as this session. |
| public Map | |
| protected MessageHandler. | |
| public String | |
| public String | |
| public Map | |
| public URI | |
| protected long | |
| private Object | |
| protected MessageHandler | |
| public Principal | |
| public Principal | |
| public Map | |
| public boolean | |
| private boolean | |
| public boolean | |
| public boolean | |
| public void | onClose(CloseReason
The reason contained within the received close message. closeReason)Called when a close message is received. |
| protected void | registerFuture(FutureToSendHandler
The handler f2sh)Make the session aware of a |
| public void | removeMessageHandler(MessageHandler listener)
Implements jakarta.
|
| public void | |
| private void | |
| public void | setMaxBinaryMessageBufferSize(int
The new maximum buffer size in bytes max)Implements jakarta. Set the current maximum buffer size for binary messages. |
| public void | setMaxIdleTimeout(long
The new idle timeout for this session in milliseconds. Zero or negative values indicate an
infinite timeout. timeout)Implements jakarta. Set the idle timeout for this session. |
| public void | setMaxTextMessageBufferSize(int
The new maximum buffer size in characters. max)Implements jakarta. Set the maximum buffer size for text messages. |
| pack-priv void | |
| public void | |
| protected void | unregisterFuture(FutureToSendHandler
The handler f2sh)Remove a |
| protected void | |
| protected void |