Class ServerWebSocketHandshake
- All Implemented Interfaces:
MutinyDelegate
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServerWebSocketHandshake
(io.vertx.core.http.ServerWebSocketHandshake delegate) ServerWebSocketHandshake
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<ServerWebSocket>
accept()
Accept the WebSocket and terminate the WebSocket handshake.Blocking variant ofaccept()
.void
Variant ofaccept()
that ignores the result of the operation.boolean
io.vertx.core.http.ServerWebSocketHandshake
int
hashCode()
headers()
boolean
isSsl()
static ServerWebSocketHandshake
newInstance
(io.vertx.core.http.ServerWebSocketHandshake arg) path()
query()
io.smallrye.mutiny.Uni<Void>
reject()
Reject the WebSocket.io.smallrye.mutiny.Uni<Void>
reject
(int status) Likereject()
but with astatus
.Blocking variant ofreject()
.rejectAndAwait
(int status) Blocking variant ofreject(int)
.void
Variant ofreject()
that ignores the result of the operation.void
rejectAndForget
(int status) Variant ofreject(int)
that ignores the result of the operation.scheme()
toString()
uri()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ServerWebSocketHandshake
public ServerWebSocketHandshake(io.vertx.core.http.ServerWebSocketHandshake delegate) -
ServerWebSocketHandshake
-
-
Method Details
-
getDelegate
public io.vertx.core.http.ServerWebSocketHandshake getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
headers
- Returns:
- the headers
-
scheme
- Returns:
- the WebSocket handshake scheme
-
authority
- Returns:
- the WebSocket handshake authority
-
uri
-
path
- Returns:
- the WebSocket handshake path.
-
query
- Returns:
- the WebSocket handshake query string.
-
accept
Accept the WebSocket and terminate the WebSocket handshake. This method should be called from the WebSocket handler to explicitly accept the WebSocket and terminate the WebSocket handshake.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
acceptAndAwait
Blocking variant ofaccept()
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the ServerWebSocket instance produced by the operation.
-
acceptAndForget
public void acceptAndForget() -
reject
Reject the WebSocket.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 response code.
You might use this method, if for example you only want to accept WebSockets with a particular path.
Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
rejectAndAwait
Blocking variant ofreject()
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
rejectAndForget
public void rejectAndForget() -
reject
Likereject()
but with astatus
.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
status
-- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
rejectAndAwait
Blocking variant ofreject(int)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
status
-- Returns:
- the Void instance produced by the operation.
-
rejectAndForget
public void rejectAndForget(int status) Variant ofreject(int)
that ignores the result of the operation.This method subscribes on the result of
reject(int)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromreject(int)
but you don't need to compose it with other operations.- Parameters:
status
-
-
remoteAddress
- Returns:
- the remote address for this connection, possibly
null
(e.g a server bound on a domain socket). IfuseProxyProtocol
is set totrue
, the address returned will be of the actual connecting client.
-
localAddress
- Returns:
- the local address for this connection, possibly
null
(e.g a server bound on a domain socket) IfuseProxyProtocol
is set totrue
, the address returned will be of the proxy.
-
isSsl
public boolean isSsl()- Returns:
- true if this
HttpConnection
is encrypted via SSL/TLS.
-
sslSession
- Returns:
- SSLSession associated with the underlying socket. Returns null if connection is not SSL.
-
newInstance
-