Class ServerWebSocketHandshake
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Julien Viet
- See Also:
-
ServerWebSocketHandshake
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServerWebSocketHandshake(io.vertx.core.http.ServerWebSocketHandshake delegate) Create a new instance ofServerWebSocketHandshakedelegating to the given (non-null) instance ofServerWebSocketHandshake.ServerWebSocketHandshake(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<ServerWebSocket>accept()Accept the WebSocket and terminate the WebSocket handshake.Accept the WebSocket and terminate the WebSocket handshake.Accept the WebSocket and terminate the WebSocket handshake.io.vertx.core.net.HostAndPortbooleanio.vertx.core.http.ServerWebSocketHandshakeGet the delegate instance.inthashCode()io.vertx.core.MultiMapheaders()Returns the HTTP headers.booleanisSsl()io.vertx.core.net.SocketAddressstatic ServerWebSocketHandshakenewInstance(io.vertx.core.http.ServerWebSocketHandshake delegate) Creates a new instance of theServerWebSocketHandshake.path()query()io.smallrye.mutiny.Uni<Void>reject()Reject the WebSocket.io.smallrye.mutiny.Uni<Void>reject(int status) Likereject()but with astatus.voidReject the WebSocket.voidrejectAndAwait(int status) Likereject()but with astatus.Reject the WebSocket.rejectAndForget(int status) Likereject()but with astatus.io.vertx.core.net.SocketAddressscheme()toString()uri()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ServerWebSocketHandshake
public ServerWebSocketHandshake(io.vertx.core.http.ServerWebSocketHandshake delegate) Create a new instance ofServerWebSocketHandshakedelegating to the given (non-null) instance ofServerWebSocketHandshake. -
ServerWebSocketHandshake
-
-
Method Details
-
getDelegate
public io.vertx.core.http.ServerWebSocketHandshake getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - Throws:
when- the WebSocket handshake is already set- See Also:
-
ServerWebSocketHandshake.accept()
-
acceptAndAwait
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
ServerWebSocket. This method awaits indefinitely 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 aRuntimeException).- Returns:
- The operation result
- Throws:
when- the WebSocket handshake is already set- See Also:
-
ServerWebSocketHandshake.accept()
-
acceptAndForget
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 ignores the
ServerWebSocketresult or any failure.- Returns:
- The current instance to chain operations if needed.
- Throws:
when- the WebSocket handshake is already set- See Also:
-
ServerWebSocketHandshake.accept()
-
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 502 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - Throws:
when- the WebSocket handshake is already set- See Also:
-
ServerWebSocketHandshake.reject()
-
rejectAndAwait
public void rejectAndAwait()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 502 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
Void. This method awaits indefinitely 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 aRuntimeException).- Throws:
when- the WebSocket handshake is already set- See Also:
-
ServerWebSocketHandshake.reject()
-
rejectAndForget
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 502 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 ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- Throws:
when- the WebSocket handshake is already set- See Also:
-
ServerWebSocketHandshake.reject()
-
reject
Likereject()but with astatus.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
ServerWebSocketHandshake.reject(int)
-
rejectAndAwait
public void rejectAndAwait(int status) Likereject()but with astatus.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely 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 aRuntimeException).- See Also:
-
ServerWebSocketHandshake.reject(int)
-
rejectAndForget
Likereject()but with astatus.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
ServerWebSocketHandshake.reject(int)
-
headers
public io.vertx.core.MultiMap headers()Returns the HTTP headers.- Returns:
- the headers
-
scheme
- Returns:
- the WebSocket handshake scheme. Can be
null.
-
authority
public io.vertx.core.net.HostAndPort authority()- Returns:
- the WebSocket handshake authority. Can be
null.
-
uri
-
path
- Returns:
- the WebSocket handshake path.
-
query
- Returns:
- the WebSocket handshake query string. Can be
null.
-
remoteAddress
public io.vertx.core.net.SocketAddress remoteAddress()- Returns:
- the remote address for this connection, possibly
null(e.g a server bound on a domain socket). IfuseProxyProtocolis set totrue, the address returned will be of the actual connecting client.
-
localAddress
public io.vertx.core.net.SocketAddress localAddress()- Returns:
- the local address for this connection, possibly
null(e.g a server bound on a domain socket) IfuseProxyProtocolis set totrue, the address returned will be of the proxy.
-
isSsl
public boolean isSsl()- Returns:
- true if this
HttpConnectionis encrypted via SSL/TLS.
-
sslSession
- Returns:
- SSLSession associated with the underlying socket. Returns null if connection is not SSL.
- See Also:
-
newInstance
public static ServerWebSocketHandshake newInstance(io.vertx.core.http.ServerWebSocketHandshake delegate) Creates a new instance of theServerWebSocketHandshake. -
hashCode
public int hashCode() -
equals
-
toString
-