Class WebSocketHandler

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void close()  
      protected void doubleConnProcedure​(java.lang.String peerSki)  
      void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)  
      java.lang.String getPeerSki()  
      java.lang.String getRemoteAddress()  
      java.lang.String getRemoteHost()  
      java.lang.String getRemoteIpAndPort()  
      ShipConnectionImpl getShipConnection()  
      int getTrustLevel()  
      protected void handlePingPongFrame​(io.netty.handler.codec.http.websocketx.WebSocketFrame frame)  
      protected byte[] handleWebSocketFrame​(io.netty.handler.codec.http.websocketx.WebSocketFrame frame)  
      protected boolean isPingPongFrame​(io.netty.handler.codec.http.websocketx.WebSocketFrame frame)  
      boolean isShipConnRdy​(int timeoutSeconds)  
      void sendMsg​(byte[] msg)  
      • Methods inherited from class io.netty.channel.SimpleChannelInboundHandler

        acceptInboundMessage, channelRead, channelRead0
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Field Detail

      • log

        protected final org.slf4j.Logger log
      • channel

        protected io.netty.channel.Channel channel
      • shipConnRdyLatch

        protected java.util.concurrent.CountDownLatch shipConnRdyLatch
      • pongReceived

        protected boolean pongReceived
      • messageBuffer

        protected final java.io.ByteArrayOutputStream messageBuffer
    • Method Detail

      • isPingPongFrame

        protected boolean isPingPongFrame​(io.netty.handler.codec.http.websocketx.WebSocketFrame frame)
      • handlePingPongFrame

        protected void handlePingPongFrame​(io.netty.handler.codec.http.websocketx.WebSocketFrame frame)
      • handleWebSocketFrame

        protected byte[] handleWebSocketFrame​(io.netty.handler.codec.http.websocketx.WebSocketFrame frame)
      • getTrustLevel

        public int getTrustLevel()
      • getRemoteIpAndPort

        public java.lang.String getRemoteIpAndPort()
      • getRemoteHost

        public java.lang.String getRemoteHost()
      • doubleConnProcedure

        protected void doubleConnProcedure​(java.lang.String peerSki)
      • isShipConnRdy

        public boolean isShipConnRdy​(int timeoutSeconds)
                              throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • exceptionCaught

        public void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,
                                    java.lang.Throwable cause)
                             throws java.lang.Exception
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelHandler
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        exceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception