public class WebSocketInboundFrameHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
| Constructor and Description |
|---|
WebSocketInboundFrameHandler(boolean isServer,
boolean secureConnection,
String target,
String negotiatedSubProtocol,
WebSocketConnectorFuture connectorFuture,
WebSocketMessageQueueHandler webSocketMessageQueueHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
DefaultWebSocketConnection |
getWebSocketConnection()
Retrieve the WebSocket connection associated with the frame handler.
|
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
boolean |
isCloseFrameReceived()
Check whether a close frame is received without the relevant connection to this Frame handler sending a close
frame.
|
void |
setCloseInitialized(boolean closeInitialized) |
void |
setClosePromise(io.netty.channel.ChannelPromise closePromise)
Set channel promise for WebSocket connection close.
|
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedensureNotSharable, handlerRemoved, isSharablepublic WebSocketInboundFrameHandler(boolean isServer,
boolean secureConnection,
String target,
String negotiatedSubProtocol,
WebSocketConnectorFuture connectorFuture,
WebSocketMessageQueueHandler webSocketMessageQueueHandler)
public void setClosePromise(io.netty.channel.ChannelPromise closePromise)
closePromise - ChannelPromise to indicate the receiving of close frame echo
back from the remote endpoint.public DefaultWebSocketConnection getWebSocketConnection()
public boolean isCloseFrameReceived()
public void setCloseInitialized(boolean closeInitialized)
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
throws WebSocketConnectorException
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterWebSocketConnectorExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws WebSocketConnectorException
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterWebSocketConnectorExceptionpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws WebSocketConnectorException
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterWebSocketConnectorExceptionCopyright © 2021 WSO2. All rights reserved.