Package io.vertx.rxjava3.core.http
Class ServerWebSocketHandshake
java.lang.Object
io.vertx.rxjava3.core.http.ServerWebSocketHandshake
- All Implemented Interfaces:
RxDelegate
A server WebSocket handshake, allows to control acceptance or rejection of a WebSocket.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<ServerWebSocket>accept()Accept the WebSocket and terminate the WebSocket handshake.booleaninthashCode()headers()Returns the HTTP headers.booleanisSsl()static ServerWebSocketHandshakepath()query()io.reactivex.rxjava3.core.Completablereject()Reject the WebSocket.io.reactivex.rxjava3.core.Completablereject(int status) Likereject()but with astatus.io.reactivex.rxjava3.core.Single<ServerWebSocket>rxAccept()Accept the WebSocket and terminate the WebSocket handshake.io.reactivex.rxjava3.core.CompletablerxReject()Reject the WebSocket.io.reactivex.rxjava3.core.CompletablerxReject(int status) Likereject()but with astatus.scheme()toString()uri()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ServerWebSocketHandshake
-
ServerWebSocketHandshake
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceRxDelegate
-
headers
Returns the HTTP 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.- Returns:
-
rxAccept
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.- Returns:
-
reject
public io.reactivex.rxjava3.core.Completable 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.
- Returns:
-
rxReject
public io.reactivex.rxjava3.core.Completable rxReject()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.
- Returns:
-
reject
public io.reactivex.rxjava3.core.Completable reject(int status) Likereject()but with astatus.- Parameters:
status-- Returns:
-
rxReject
public io.reactivex.rxjava3.core.Completable rxReject(int status) Likereject()but with astatus.- Parameters:
status-- Returns:
-
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
- 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.
-
newInstance
-