WebSocketSession for use with the Jetty WebSocket API.
| Modifier and Type | Class and Description |
|---|---|
| private static interface |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private List | |
| private HttpHeaders | |
| private final String | |
| private URI | |
| private Principal |
| Access | Constructor and Description |
|---|---|
| public | JettyWebSocketSession(Map<String, Object>
the attributes from the HTTP handshake to associate with the WebSocket session attributes)Create a new |
| public | JettyWebSocketSession(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, Principal the user associated with the session; if user)null we'll fall back on the
user available via org.Create a new |
| acceptedProtocol | back to summary |
|---|---|
| private String acceptedProtocol
| |
| extensions | back to summary |
|---|---|
| private List<WebSocketExtension> extensions
| |
| headers | back to summary |
|---|---|
| private HttpHeaders headers
| |
| id | back to summary |
|---|---|
| private final String id | |
| uri | back to summary |
|---|---|
| private URI uri
| |
| user | back to summary |
|---|---|
| private Principal user
| |
| JettyWebSocketSession | back to summary |
|---|---|
| public JettyWebSocketSession(Map<String, Object> attributes) Create a new | |
| JettyWebSocketSession | back to summary |
|---|---|
| public JettyWebSocketSession(Map<String, Object> attributes, Principal user) Create a new
| |
| 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.
| |
| getExtensions | back to summary |
|---|---|
| private List | |
| 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.
| |
| useSession | back to summary |
|---|---|
| private void useSession(JettyWebSocketSession. | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| consume | back to summary |
|---|---|
| public void consume(Session session, Callback callback) throws IOException | |