Class ShipClientHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.SimpleChannelInboundHandler<java.lang.Object>
-
- org.openmuc.jship.node.websocket.WebSocketHandler
-
- org.openmuc.jship.node.websocket.client.ShipClientHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
public class ShipClientHandler extends WebSocketHandler
-
-
Field Summary
-
Fields inherited from class org.openmuc.jship.node.websocket.WebSocketHandler
basicCB, ch, log, nodeCtx, pongReceived, shipConnRdyLatch, socketCB
-
-
Constructor Summary
Constructors Constructor Description ShipClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, ShipNodeContext nodeCtx, WebSocketCallBack socketCB, StopClientCallBack stopCB)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelActive(io.netty.channel.ChannelHandlerContext ctx)
void
channelInactive(io.netty.channel.ChannelHandlerContext ctx)
void
channelRead0(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)
void
close()
void
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)
ShipConnection
getConnection()
void
handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
io.netty.channel.ChannelFuture
handshakeFuture()
void
setConnection(ShipConnection connection)
-
Methods inherited from class org.openmuc.jship.node.websocket.WebSocketHandler
checkDoubleConn, getPeerSki, getRemoteAddr, getRemoteHost, getTrustLevel, handlePingPongFrame, handleWebSocketFrame, isPingPongFrame, isShipConnRdy, sendMsg
-
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
ShipClientHandler
public ShipClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, ShipNodeContext nodeCtx, WebSocketCallBack socketCB, StopClientCallBack stopCB)
-
-
Method Detail
-
handshakeFuture
public io.netty.channel.ChannelFuture handshakeFuture()
-
handlerAdded
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
handlerAdded
in interfaceio.netty.channel.ChannelHandler
- Overrides:
handlerAdded
in classio.netty.channel.ChannelHandlerAdapter
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
-
channelRead0
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)
- Specified by:
channelRead0
in classio.netty.channel.SimpleChannelInboundHandler<java.lang.Object>
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in classio.netty.channel.ChannelInboundHandlerAdapter
-
close
public void close()
- Specified by:
close
in classWebSocketHandler
-
getConnection
public ShipConnection getConnection()
- Overrides:
getConnection
in classWebSocketHandler
-
setConnection
public void setConnection(ShipConnection connection)
-
-