Class ShipServerHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.SimpleChannelInboundHandler<java.lang.Object>
-
- org.openmuc.jeebus.ship.node.websocket.WebSocketHandler
-
- org.openmuc.jeebus.ship.node.websocket.server.ShipServerHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class ShipServerHandler extends WebSocketHandler
-
-
Field Summary
-
Fields inherited from class org.openmuc.jeebus.ship.node.websocket.WebSocketHandler
basicCB, ch, connection, log, messageBuffer, nodeCtx, pongReceived, shipConnRdyLatch, socketCB
-
-
Constructor Summary
Constructors Constructor Description ShipServerHandler(ShipNodeContext nodeCtx, ServerCallBack serverCB)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchannelActive(io.netty.channel.ChannelHandlerContext ctx)voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx)voidchannelRead0(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)voidchannelReadComplete(io.netty.channel.ChannelHandlerContext ctx)voidclose()voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)io.netty.channel.ChannelgetChannel()voidsetConnection(ShipConnection connection)-
Methods inherited from class org.openmuc.jeebus.ship.node.websocket.WebSocketHandler
doubleConnProcedure, getConnection, getPeerSki, getRemoteHost, getRemoteIpAndPort, getTrustLevel, handlePingPongFrame, handleWebSocketFrame, isPingPongFrame, isShipConnRdy, sendMsg
-
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
ShipServerHandler
public ShipServerHandler(ShipNodeContext nodeCtx, ServerCallBack serverCB)
-
-
Method Detail
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception- Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
java.lang.Exception
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
java.lang.Exception
-
channelRead0
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg) throws java.io.IOException- Specified by:
channelRead0in classio.netty.channel.SimpleChannelInboundHandler<java.lang.Object>- Throws:
java.io.IOException
-
channelReadComplete
public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
channelReadCompletein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadCompletein classio.netty.channel.ChannelInboundHandlerAdapter
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
java.lang.Exception
-
setConnection
public void setConnection(ShipConnection connection)
-
getChannel
public io.netty.channel.Channel getChannel()
-
close
public void close()
- Specified by:
closein classWebSocketHandler
-
-