public interface WebSocketHandshaker extends WebSocketMessage
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.ChannelFuture |
cancelHandshake(int closeCode,
String closeReason)
Cancel the handshake with HTTP response.
|
String |
getChannelId()
Retrieve the Channel ID of the connection.
|
HttpCarbonRequest |
getHttpCarbonRequest()
Get the HttpCarbonRequest received from the client to perform the handshake.
|
ServerHandshakeFuture |
handshake()
Complete the handshake of a given request.
|
ServerHandshakeFuture |
handshake(String[] subProtocols)
Complete the handshake of a given request.
|
ServerHandshakeFuture |
handshake(String[] subProtocols,
int idleTimeout)
Complete the handshake of a given request.
|
ServerHandshakeFuture |
handshake(String[] subProtocols,
int idleTimeout,
io.netty.handler.codec.http.HttpHeaders responseHeaders)
Complete the handshake of a given request.
|
ServerHandshakeFuture |
handshake(String[] subProtocols,
int idleTimeout,
io.netty.handler.codec.http.HttpHeaders responseHeaders,
int maxFramePayloadLength)
Complete the handshake of a given request.
|
boolean |
isCancelled()
Check whether the handshake is cancelled in someplace or not.
|
boolean |
isHandshakeStarted()
Check whether the handshake has been started or not.
|
boolean |
isSecure()
Check whether the connection is secure or not.
|
getTarget, getWebSocketConnection, isServerMessageServerHandshakeFuture handshake()
ServerHandshakeFuture handshake(String[] subProtocols)
subProtocols - Sub-Protocols which are allowed by the service.ServerHandshakeFuture handshake(String[] subProtocols, int idleTimeout)
subProtocols - Sub-Protocols which are allowed by the service.idleTimeout - Idle timeout in milli-seconds for WebSocket connection.ServerHandshakeFuture handshake(String[] subProtocols, int idleTimeout, io.netty.handler.codec.http.HttpHeaders responseHeaders)
subProtocols - Sub-Protocols which are allowed by the service.idleTimeout - Idle timeout in milli-seconds for WebSocket connection.responseHeaders - Extra headers to add to the handshake response or null if no extra headers should
be addedServerHandshakeFuture handshake(String[] subProtocols, int idleTimeout, io.netty.handler.codec.http.HttpHeaders responseHeaders, int maxFramePayloadLength)
subProtocols - Sub-Protocols which are allowed by the service.idleTimeout - Idle timeout in milli-seconds for WebSocket connection.responseHeaders - Extra headers to add to the handshake response or null if no extra
headers should
be added.maxFramePayloadLength - Maximum allowable frame payload length. Setting this value to your application's
requirement may reduce denial of service attacks using long data frames.HttpCarbonRequest getHttpCarbonRequest()
io.netty.channel.ChannelFuture cancelHandshake(int closeCode,
String closeReason)
closeCode - close code for cancelling the handshake.closeReason - reason for canceling the handshake.boolean isCancelled()
boolean isHandshakeStarted()
boolean isSecure()
String getChannelId()
Copyright © 2021 WSO2. All rights reserved.