WebSocketSession for use with the standard WebSocket for Java API.
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private List | |
| private final HttpHeaders | |
| private final String | |
| private final InetSocketAddress | |
| private final InetSocketAddress | |
| private URI | |
| private Principal |
| Access | Constructor and Description |
|---|---|
| public | StandardWebSocketSession(HttpHeaders
the headers of the handshake request headers, Map<String, Object> the attributes from the HTTP handshake to associate with the WebSocket
session; the provided attributes are copied, the original map is not used. attributes, InetSocketAddress the address on which the request was received localAddress, InetSocketAddress the address of the remote client remoteAddress)Constructor for a standard WebSocket session. |
| public | StandardWebSocketSession(HttpHeaders
the headers of the handshake request headers, Map<String, Object> the attributes from the HTTP handshake to associate with the WebSocket session attributes, InetSocketAddress the address on which the request was received localAddress, InetSocketAddress the address of the remote client remoteAddress, Principal the user associated with the session; if user)null we'll
fall back on the user available in the underlying WebSocket sessionConstructor that associates a user with the WebSocket session. |
| acceptedProtocol | back to summary |
|---|---|
| private String acceptedProtocol
| |
| extensions | back to summary |
|---|---|
| private List<WebSocketExtension> extensions
| |
| handshakeHeaders | back to summary |
|---|---|
| private final HttpHeaders handshakeHeaders | |
| id | back to summary |
|---|---|
| private final String id | |
| localAddress | back to summary |
|---|---|
| private final InetSocketAddress localAddress
| |
| remoteAddress | back to summary |
|---|---|
| private final InetSocketAddress remoteAddress
| |
| uri | back to summary |
|---|---|
| private URI uri
| |
| user | back to summary |
|---|---|
| private Principal user
| |
| StandardWebSocketSession | back to summary |
|---|---|
| public StandardWebSocketSession(HttpHeaders headers, Map<String, Object> attributes, InetSocketAddress localAddress, InetSocketAddress remoteAddress) Constructor for a standard WebSocket session.
| |
| StandardWebSocketSession | back to summary |
|---|---|
| public StandardWebSocketSession(HttpHeaders headers, Map<String, Object> attributes, InetSocketAddress localAddress, InetSocketAddress remoteAddress, Principal user) Constructor that associates a user with the WebSocket session.
| |
| closeInternal | back to summary |
|---|---|
| protected void closeInternal(CloseStatus status) throws IOException Implements abstract org.
| |
| getAcceptedProtocol | back to summary |
|---|---|
| public String getAcceptedProtocol() Implements org. Doc from org. Return the negotiated sub-protocol. | |
| getBinaryMessageSizeLimit | back to summary |
|---|---|
| public int getBinaryMessageSizeLimit() Implements org. Doc from org. Get the configured maximum size for an incoming binary message.
| |
| getExtensions | back to summary |
|---|---|
| public List Implements org. Doc from org. Determine the negotiated extensions.
| |
| getHandshakeHeaders | back to summary |
|---|---|
| public HttpHeaders getHandshakeHeaders() Implements org. Doc from org. Return the headers used in the handshake request (never
| |
| getId | back to summary |
|---|---|
| public String getId() Implements org. Doc from org. Return a unique session identifier.
| |
| getLocalAddress | back to summary |
|---|---|
| public InetSocketAddress getLocalAddress() Implements org. Doc from org. Return the address on which the request was received. | |
| getPrincipal | back to summary |
|---|---|
| public Principal getPrincipal() Implements org. Doc from org. Return a If the user has not been authenticated, the method returns
| |
| getRemoteAddress | back to summary |
|---|---|
| public InetSocketAddress getRemoteAddress() Implements org. Doc from org. Return the address of the remote client. | |
| getTextMessageSizeLimit | back to summary |
|---|---|
| public int getTextMessageSizeLimit() Implements org. Doc from org. Get the configured maximum size for an incoming text message.
| |
| getUri | back to summary |
|---|---|
| public URI getUri() Implements org. Doc from org. Return the URI used to open the WebSocket connection. | |
| initializeNativeSession | back to summary |
|---|---|
| public void initializeNativeSession(Session session) Overrides org.
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements org. Doc from org. Whether the underlying connection is open.
| |
| sendBinaryMessage | back to summary |
|---|---|
| protected void sendBinaryMessage(BinaryMessage message) throws IOException Implements abstract org.
| |
| sendPingMessage | back to summary |
|---|---|
| protected void sendPingMessage(PingMessage message) throws IOException Implements abstract org.
| |
| sendPongMessage | back to summary |
|---|---|
| protected void sendPongMessage(PongMessage message) throws IOException Implements abstract org.
| |
| sendTextMessage | back to summary |
|---|---|
| protected void sendTextMessage(TextMessage message) throws IOException Implements abstract org.
| |
| setBinaryMessageSizeLimit | back to summary |
|---|---|
| public void setBinaryMessageSizeLimit(int messageSizeLimit) Implements org. Doc from org. Configure the maximum size for an incoming binary message.
| |
| setTextMessageSizeLimit | back to summary |
|---|---|
| public void setTextMessageSizeLimit(int messageSizeLimit) Implements org. Doc from org. Configure the maximum size for an incoming text message.
| |