Session.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| pack-priv static enum | TyrusSession.
Session state. |
| Modifier and Type | Field and Description |
|---|---|
| private final TyrusRemoteEndpoint. | |
| private final TyrusRemoteEndpoint. | |
| private final BinaryBuffer | |
| private final String | |
| private final WebSocketContainer | |
| private final DebugContext | |
| private final Map | |
| private final Map | |
| private final TyrusEndpointWrapper | |
| private final MessageHandlerManager | |
| private final ReentrantLock | |
| private volatile long | |
| private volatile ScheduledFuture | |
| private final String | |
| private volatile ScheduledFuture | |
| private final ReentrantLock | |
| private InputStreamBuffer | |
| private final boolean | |
| private static final Logger | |
| private int | |
| private volatile long | |
| private int | |
| private final List | |
| private final String | |
| private final Map | |
| private final String | |
| private ReaderBuffer | |
| private final String | |
| private final Map | |
| private final URI | |
| private final String | |
| private final int | |
| private ScheduledExecutorService | |
| private final AtomicReference | |
| private final TextBuffer | |
| private final Principal | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv | TyrusSession(WebSocketContainer container, TyrusWebSocket socket, TyrusEndpointWrapper endpointWrapper, String subprotocol, List<Extension> extensions, boolean isSecure, URI requestURI, String queryString, Map<String, String> pathParameters, Principal principal, Map<String, List<String>> requestParameterMap, final ClusterContext clusterContext, String connectionId, final String remoteAddr, String serverAddr, final int serverPort, TyrusConfiguration tyrusConfiguration, DebugContext debugContext)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addMessageHandler(MessageHandler
the MessageHandler to be added. handler)Implements jakarta.
Deprecated
please use
addMessageHandler(Class, jakarta. or addMessageHandler(Class, jakarta.
Register to handle to incoming messages in this conversation. |
| public <T> void | addMessageHandler(Class<T>
type of the message processed by message handler to be registered. clazz, MessageHandler.the MessageHandler to be added. handlerImplements jakarta. Register to handle to incoming messages in this conversation. |
| public <T> void | addMessageHandler(Class<T>
type of the message processed by message handler to be registered. clazz, MessageHandler.the MessageHandler to be added. handlerImplements jakarta. Register to handle to incoming messages in this conversation. |
| public Map | |
| public Map | Returns: map of local sessions and futures for user to get the information about status of the message.message to be broadcasted. message)Broadcasts binary message to all connected clients, including remote sessions (if any). |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | close()
Implements jakarta. Close the current conversation with a normal status code and no reason phrase. |
| public void | close(CloseReason
the reason for the closure. closeReason)Implements jakarta. Close the current conversation, giving a reason for the closure. |
| private static void | |
| public Set | Returns: set of distributed sessions.Get set of all sessions opened to the same endpoint. |
| public RemoteEndpoint. | getAsyncRemote()
Implements jakarta. Return a reference a RemoteEndpoint object representing the peer of this conversation that is able to send messages asynchronously to the peer. |
| public RemoteEndpoint. | getBasicRemote()
Implements jakarta. Return a reference a RemoteEndpoint object representing the peer of this conversation that is able to send messages synchronously to the peer. |
| pack-priv BinaryBuffer | |
| pack-priv String | |
| public WebSocketContainer | getContainer()
Implements jakarta. Return the container that this session is part of. |
| pack-priv DebugContext | |
| public Map | getDistributedProperties()
Implements org. Get distributed properties. |
| public long | Returns: heartbeatInterval interval between periodic pong messages in milliseconds.Return an interval in milliseconds between scheduled periodic Pong messages. |
| public String | getId()
Implements jakarta. Returns a string containing the unique identifier assigned to this session. |
| pack-priv InputStreamBuffer | |
| public int | getMaxBinaryMessageBufferSize()
Implements jakarta. The maximum length of incoming binary messages that this Session can buffer. |
| public long | getMaxIdleTimeout()
Implements jakarta. Return the number of milliseconds before this session will be closed by the container if it is inactive, i.e. no messages are either sent or received in that time. |
| public int | getMaxTextMessageBufferSize()
Implements jakarta. The maximum length of incoming text messages that this Session can buffer. |
| pack-priv <T> MessageHandler. | |
| public Set | getMessageHandlers()
Implements jakarta. Return an unmodifiable copy of the set of MessageHandlers for this Session. |
| public List | getNegotiatedExtensions()
Implements jakarta. Return the list of extensions currently in use for this conversation. |
| public String | getNegotiatedSubprotocol()
Implements jakarta. Return the sub protocol agreed during the websocket handshake for this conversation. |
| public Set | getOpenSessions()
Implements jakarta. Return a copy of the Set of all the open web socket sessions that represent connections to the same endpoint to which this session represents a connection. |
| public Map | getPathParameters()
Implements jakarta. Return a map of the path parameter names and values used associated with the request this session was opened under. |
| public String | getProtocolVersion()
Implements jakarta. Returns the version of the websocket protocol currently being used. |
| public String | getQueryString()
Implements jakarta. Return the query string associated with the request this session was opened under. |
| pack-priv ReaderBuffer | |
| public String | Returns: aString containing the IP address of the client that sent the request or null when
method is called on client-side.Get the Internet Protocol (IP) address of the client or last proxy that sent the request. |
| public Set | Returns: set of remote sessions or empty set, when not running in cluster environment.Get set of remote sessions. |
| public Map | getRequestParameterMap()
Implements jakarta. Return the request parameters associated with the request this session was opened under. |
| public URI | getRequestURI()
Implements jakarta. Return the complete URI under which this session was opened, from protocol to query string (if present). |
| pack-priv TyrusSession. | |
| pack-priv TextBuffer | |
| public Principal | getUserPrincipal()
Implements jakarta. Return the authenticated user for this Session or |
| public Map | getUserProperties()
Implements jakarta. While the session is open, this method returns a Map that the developer may use to store application specific information relating to this session instance. |
| pack-priv boolean | |
| public boolean | isOpen()
Implements jakarta. Return true if and only if the underlying socket is open. |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| public boolean | isSecure()
Implements jakarta. Return true if and only if the underlying socket is using a secure transport. |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | removeMessageHandler(MessageHandler
the handler to be removed. handler)Implements jakarta. Remove the given MessageHandler from the set belonging to this session. |
| pack-priv void | |
| public void | setHeartbeatInterval(long
interval between periodic Pong messages in milliseconds. heartbeatInterval)Set an interval in milliseconds between scheduled periodic Pong messages. |
| pack-priv void | |
| public void | setMaxBinaryMessageBufferSize(int
the maximum length. maxBinaryMessageBufferSize)Implements jakarta. Sets the maximum length of incoming binary messages that this Session can buffer. |
| public void | setMaxIdleTimeout(long
the number of milliseconds. maxIdleTimeout)Implements jakarta. Set the number of milliseconds before this session will be closed by the container if it is inactive, i.e. no messages are either sent or received in that time. |
| public void | setMaxTextMessageBufferSize(int
the maximum length. maxTextMessageBufferSize)Implements jakarta. Sets the maximum length of incoming text messages that this Session can buffer. |
| pack-priv void | |
| pack-priv void | |
| public String |