WebSocketSession session.
WebSocketSession#getHandshakeInfo()
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final MultiValueMap | |
| private static final MultiValueMap | |
| private final HttpHeaders | |
| private final String | |
| private final Mono | |
| private final String | |
| private final InetSocketAddress | |
| private final URI |
| Access | Constructor and Description |
|---|---|
| public | HandshakeInfo(URI
the endpoint URL uri, HttpHeaders request headers for server or response headers or client headers, Mono<Principal> the principal for the session principal, String the negotiated sub-protocol (may be protocol)null)Constructor with basic information about the handshake. |
| public | HandshakeInfo(URI
the endpoint URL uri, HttpHeaders server request headers headers, Mono<Principal> the principal for the session principal, String the negotiated sub-protocol (may be protocol, InetSocketAddress null)the remote address of the client remoteAddress, Map<String, Object> initial attributes for the WebSocket session attributes, String the log prefix for the handshake request. logPrefix)
Deprecated
as of 5.3.5 in favor of
HandshakeInfo(URI, HttpHeaders, MultiValueMap, Mono, String, InetSocketAddress, Map, String)
Constructor targeting server-side use with extra information such as the remote address, attributes, and a log prefix. |
| public | HandshakeInfo(URI
the endpoint URL uri, HttpHeaders server request headers headers, MultiValueMap<String, HttpCookie> server request cookies cookies, Mono<Principal> the principal for the session principal, String the negotiated sub-protocol (may be protocol, InetSocketAddress null)the remote address of the client remoteAddress, Map<String, Object> initial attributes for the WebSocket session attributes, String the log prefix for the handshake request. logPrefix)Constructor targeting server-side use with extra information such as the cookies, remote address, attributes, and a log prefix. |
| Modifier and Type | Method and Description |
|---|---|
| public Map | |
| public MultiValueMap | getCookies()
For a server session this returns the server request cookies from the handshake request. |
| public HttpHeaders | getHeaders()
Return the HTTP headers from the handshake request, either server request headers for a server session or the client response headers for a client session. |
| public String | Returns: a log prefix, ornull if not specifiedA log prefix used in the handshake to correlate log messages, if any. |
| public Mono | |
| public InetSocketAddress | getRemoteAddress()
For a server session this is the remote address where the handshake request came from. |
| public String | |
| public URI | |
| public String |
| attributes | back to summary |
|---|---|
| private final Map<String, Object> attributes | |
| cookies | back to summary |
|---|---|
| private final MultiValueMap<String, HttpCookie> cookies | |
| EMPTY_COOKIES | back to summary |
|---|---|
| private static final MultiValueMap<String, HttpCookie> EMPTY_COOKIES | |
| headers | back to summary |
|---|---|
| private final HttpHeaders headers | |
| logPrefix | back to summary |
|---|---|
| private final String logPrefix
| |
| principalMono | back to summary |
|---|---|
| private final Mono<Principal> principalMono | |
| protocol | back to summary |
|---|---|
| private final String protocol
| |
| remoteAddress | back to summary |
|---|---|
| private final InetSocketAddress remoteAddress
| |
| uri | back to summary |
|---|---|
| private final URI uri | |
| HandshakeInfo | back to summary |
|---|---|
| public HandshakeInfo(URI uri, HttpHeaders headers, Mono<Principal> principal, String protocol) Constructor with basic information about the handshake.
| |
| HandshakeInfo | back to summary |
|---|---|
| public HandshakeInfo(URI uri, HttpHeaders headers, Mono<Principal> principal, String protocol, InetSocketAddress remoteAddress, Map<String, Object> attributes, String logPrefix)
Deprecated as of 5.3.5 in favor of
Constructor targeting server-side use with extra information such as the remote address, attributes, and a log prefix.
| |
| HandshakeInfo | back to summary |
|---|---|
| public HandshakeInfo(URI uri, HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies, Mono<Principal> principal, String protocol, InetSocketAddress remoteAddress, Map<String, Object> attributes, String logPrefix) Constructor targeting server-side use with extra information such as the cookies, remote address, attributes, and a log prefix.
| |
| getAttributes | back to summary |
|---|---|
| public Map Attributes extracted from the handshake request to add to the session.
| |
| getCookies | back to summary |
|---|---|
| public MultiValueMap For a server session this returns the server request cookies from the handshake request. For a client session, it is an empty map.
| |
| getHeaders | back to summary |
|---|---|
| public HttpHeaders getHeaders() Return the HTTP headers from the handshake request, either server request headers for a server session or the client response headers for a client session. | |
| getLogPrefix | back to summary |
|---|---|
| public String getLogPrefix() A log prefix used in the handshake to correlate log messages, if any. | |
| getPrincipal | back to summary |
|---|---|
| public Mono Return the principal associated with the handshake request, if any. | |
| getRemoteAddress | back to summary |
|---|---|
| public InetSocketAddress getRemoteAddress() For a server session this is the remote address where the handshake
request came from. For a client session, it is
| |
| getSubProtocol | back to summary |
|---|---|
| public String getSubProtocol() The sub-protocol negotiated at handshake time, or
| |
| getUri | back to summary |
|---|---|
| public URI getUri() Return the URL for the WebSocket endpoint. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |