Top Description Fields Constructors Methods
io.netty5.handler.codec.http.websocketx

public final Class WebSocketServerHandshakeCompletionEvent

extends WebSocketHandshakeCompletionEvent
Class Inheritance
Imports
io.netty5.handler.codec.http.headers.HttpHeaders

A websocket handshake was completed on the server-side.

Field Summary

Modifier and TypeField and Description
private final HttpHeaders
private final String
private final String

Constructor Summary

AccessConstructor and Description
public
WebSocketServerHandshakeCompletionEvent(WebSocketVersion
the WebSocketVersion that was used.
version
,
String
the URI of the request.
requestUri
,
HttpHeaders
the headers of the upgrade request.
requestHeaders
,
String
the selected sub-protocol, if any.
selectedSubprotocol
)

Create a new event that indicate a successful websocket handshake.

public
WebSocketServerHandshakeCompletionEvent(Throwable
the cause of the failure.
cause
)

Create a new event that indicate a failed websocket handshake.

Method Summary

Modifier and TypeMethod and Description
public HttpHeaders

Returns:

the headers.
requestHeaders
()

Return the request HttpHeaders of the handshake if isSuccess() returns true, null otherwise.

public String

Returns:

the uri.
requestUri
()

Return the request uri of the handshake if isSuccess() returns true, null otherwise.

public String

Returns:

the sub-protocol.
selectedSubprotocol
()

Return the selected sub-protocol of the handshake if isSuccess() returns true and one was selected, null otherwise.

Inherited from io.netty5.handler.codec.http.websocketx.WebSocketHandshakeCompletionEvent:
causetoStringversion

Field Detail

requestHeadersback to summary
private final HttpHeaders requestHeaders
requestUriback to summary
private final String requestUri
selectedSubprotocolback to summary
private final String selectedSubprotocol

Constructor Detail

WebSocketServerHandshakeCompletionEventback to summary
public WebSocketServerHandshakeCompletionEvent(WebSocketVersion version, String requestUri, HttpHeaders requestHeaders, String selectedSubprotocol)

Create a new event that indicate a successful websocket handshake.

Parameters
version:WebSocketVersion

the WebSocketVersion that was used.

requestUri:String

the URI of the request.

requestHeaders:HttpHeaders

the headers of the upgrade request.

selectedSubprotocol:String

the selected sub-protocol, if any.

WebSocketServerHandshakeCompletionEventback to summary
public WebSocketServerHandshakeCompletionEvent(Throwable cause)

Create a new event that indicate a failed websocket handshake.

Parameters
cause:Throwable

the cause of the failure.

Method Detail

requestHeadersback to summary
public HttpHeaders requestHeaders()

Return the request HttpHeaders of the handshake if isSuccess() returns true, null otherwise.

Returns:HttpHeaders

the headers.

requestUriback to summary
public String requestUri()

Return the request uri of the handshake if isSuccess() returns true, null otherwise.

Returns:String

the uri.

selectedSubprotocolback to summary
public String selectedSubprotocol()

Return the selected sub-protocol of the handshake if isSuccess() returns true and one was selected, null otherwise.

Returns:String

the sub-protocol.