public class HandshakeInfo
extends java.lang.Object
WebSocketSession
session.WebSocketSession.getHandshakeInfo()
Modifier and Type | Field and Description |
---|---|
private HttpHeaders |
headers |
private <any> |
principalMono |
private java.util.Optional<java.lang.String> |
protocol |
private java.net.URI |
uri |
Constructor and Description |
---|
HandshakeInfo(java.net.URI uri,
HttpHeaders headers,
<any> principal,
java.util.Optional<java.lang.String> protocol)
Constructor with information about the handshake.
|
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
getHeaders()
Return the handshake HTTP headers.
|
<any> |
getPrincipal()
Return the principal associated with the handshake HTTP request.
|
java.util.Optional<java.lang.String> |
getSubProtocol()
The sub-protocol negotiated at handshake time.
|
java.net.URI |
getUri()
Return the URL for the WebSocket endpoint.
|
java.lang.String |
toString() |
private final java.net.URI uri
private final <any> principalMono
private final HttpHeaders headers
private final java.util.Optional<java.lang.String> protocol
public HandshakeInfo(java.net.URI uri, HttpHeaders headers, <any> principal, java.util.Optional<java.lang.String> protocol)
uri
- the endpoint URLheaders
- request headers for server or response headers or clientprincipal
- the principal for the sessionprotocol
- the negotiated sub-protocolpublic java.net.URI getUri()
public HttpHeaders getHeaders()
public <any> getPrincipal()
public java.util.Optional<java.lang.String> getSubProtocol()
public java.lang.String toString()
toString
in class java.lang.Object