public class WebSocketClientHandler extends io.netty.channel.SimpleChannelInboundHandler<Object>
WebSocketClientHandler
is implementation of
SimpleChannelInboundHandler
which handle TextWebSocketFrame
,
PongWebSocketFrame
and CloseWebSocketFrame
messages.Constructor and Description |
---|
WebSocketClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker,
ClientMessageCallback listener)
Create new Web Socket Client Handler.
|
Modifier and Type | Method and Description |
---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
io.netty.channel.ChannelFuture |
handshakeFuture()
Notifies by Future when handshake process succeeds or fails.
|
acceptInboundMessage, channelRead
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
public WebSocketClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, ClientMessageCallback listener)
handshaker
- manages handshake processlistener
- public io.netty.channel.ChannelFuture handshakeFuture()
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) throws Exception
handlerAdded
in interface io.netty.channel.ChannelHandler
handlerAdded
in class io.netty.channel.ChannelHandlerAdapter
Exception
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
Copyright © 2017 OpenDaylight. All rights reserved.