public interface ServerWebSocketHandshake
Modifier and Type | Method and Description |
---|---|
Future<ServerWebSocket> |
accept()
Accept the WebSocket and terminate the WebSocket handshake.
|
HostAndPort |
authority() |
MultiMap |
headers()
Returns the HTTP headers.
|
boolean |
isSsl() |
SocketAddress |
localAddress() |
String |
path() |
List<Certificate> |
peerCertificates() |
String |
query() |
default Future<Void> |
reject()
Reject the WebSocket.
|
Future<Void> |
reject(int status)
Like
reject() but with a status . |
SocketAddress |
remoteAddress() |
String |
scheme() |
SSLSession |
sslSession() |
String |
uri() |
MultiMap headers()
String scheme()
HostAndPort authority()
String uri()
String path()
String query()
Future<ServerWebSocket> accept()
IllegalStateException
- when the WebSocket handshake is already setdefault Future<Void> reject()
Calling this method from the WebSocket handler when it is first passed to you gives you the opportunity to reject the WebSocket, which will cause the WebSocket handshake to fail by returning a 502 response code.
You might use this method, if for example you only want to accept WebSockets with a particular path.
IllegalStateException
- when the WebSocket handshake is already setSocketAddress remoteAddress()
null
(e.g a server bound on a domain socket).
If useProxyProtocol
is set to true
, the address returned will be of the actual connecting client.SocketAddress localAddress()
null
(e.g a server bound on a domain socket)
If useProxyProtocol
is set to true
, the address returned will be of the proxy.boolean isSsl()
HttpConnection
is encrypted via SSL/TLS.SSLSession sslSession()
SSLSession
List<Certificate> peerCertificates() throws SSLPeerUnverifiedException
SSLPeerUnverifiedException
- SSL peer's identity has not been verified.()
,
sslSession()
Copyright © 2024 Eclipse. All rights reserved.