Class FusedSslHandler

  • All Implemented Interfaces:,,

    public class FusedSslHandler
    extends io.netty.handler.ssl.SslHandler
    An implementation of SslHandler which limits the number of objects held within the pendingUnencryptedWrites queue. This queue is normally very small but when there is some badly behaved code which writes to the channel in a tight loop, we would want to fail further writes so that we don't fall into an OOM situation.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  FusedSslHandler.OverflowException  
      • Nested classes/interfaces inherited from class io.netty.handler.codec.ByteToMessageDecoder

      • Nested classes/interfaces inherited from interface
    • Field Summary

      • Fields inherited from class io.netty.handler.codec.ByteToMessageDecoder

    • Constructor Summary

      Constructor Description
      FusedSslHandler​( engine)  
      FusedSslHandler​( engine, java.util.concurrent.Executor delegatedTaskExecutor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getOutboundQueueSize()
      The length of the outbound queue.
      int getOutboundQueueSizeLimit()  
      void handlerAdded​( ctx)  
      void setOutboundQueueSizeLimit​(int maxOutboundQueueSize)  
      void write​( ctx, java.lang.Object msg, promise)  
      • Methods inherited from class io.netty.handler.ssl.SslHandler

        applicationProtocol, bind, channelActive, channelInactive, channelReadComplete, close, close, close, closeOutbound, closeOutbound, connect, decode, deregister, disconnect, engine, exceptionCaught, flush, getCloseNotifyFlushTimeoutMillis, getCloseNotifyReadTimeoutMillis, getCloseNotifyTimeoutMillis, getHandshakeTimeoutMillis, handlerRemoved0, handshakeFuture, isEncrypted, read, renegotiate, renegotiate, setCloseNotifyFlushTimeout, setCloseNotifyFlushTimeoutMillis, setCloseNotifyReadTimeout, setCloseNotifyReadTimeoutMillis, setCloseNotifyTimeout, setCloseNotifyTimeoutMillis, setHandshakeTimeout, setHandshakeTimeoutMillis, setWrapDataSize, sslCloseFuture
      • Methods inherited from class io.netty.handler.codec.ByteToMessageDecoder

        actualReadableBytes, callDecode, channelRead, decodeLast, discardSomeReadBytes, handlerRemoved, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
      • Methods inherited from class

        channelRegistered, channelUnregistered, channelWritabilityChanged
      • Methods inherited from class

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface

    • Constructor Detail

      • FusedSslHandler

        public FusedSslHandler​( engine)
      • FusedSslHandler

        public FusedSslHandler​( engine,
                               java.util.concurrent.Executor delegatedTaskExecutor)
    • Method Detail

      • setOutboundQueueSizeLimit

        public void setOutboundQueueSizeLimit​(@Nonnegative
                                              int maxOutboundQueueSize)
      • getOutboundQueueSizeLimit

        public int getOutboundQueueSizeLimit()
      • getOutboundQueueSize

        public int getOutboundQueueSize()
        The length of the outbound queue. This queue includes both ByteBuf and ChannelPromise objects. This operation is O(1) since the queue is an ArrayDeque.
        number of objects in the queue
      • write

        public void write​( ctx,
                          java.lang.Object msg,
                   throws java.lang.Exception
        Specified by:
        write in interface
        write in class io.netty.handler.ssl.SslHandler
      • handlerAdded

        public void handlerAdded​( ctx)
                          throws java.lang.Exception
        Specified by:
        handlerAdded in interface
        handlerAdded in class io.netty.handler.ssl.SslHandler