Class AbstrHttpConnectionExpiryHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelOutboundHandlerAdapter
com.netflix.netty.common.AbstrHttpConnectionExpiryHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelOutboundHandler
Direct Known Subclasses:
Http1ConnectionExpiryHandler, Http2ConnectionExpiryHandler

public abstract class AbstrHttpConnectionExpiryHandler extends io.netty.channel.ChannelOutboundHandlerAdapter
User: [email protected] Date: 7/17/17 Time: 10:54 AM
  • Nested Class Summary

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

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

    Fields
    Modifier and Type
    Field
    Description
    protected final ConnectionCloseType
     
    protected final long
     
    protected final long
     
    protected static final org.slf4j.Logger
     
    protected static final com.netflix.config.CachedDynamicLongProperty
     
    protected final int
     
    protected final int
     
    protected int
     
    protected int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstrHttpConnectionExpiryHandler(ConnectionCloseType connectionCloseType, int maxRequestsUnderBrownout, int maxRequests, int maxExpiry)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    isConnectionExpired(io.netty.channel.Channel channel)
     
    protected abstract boolean
     
    protected int
    maxRequests(io.netty.channel.Channel ch)
     
    void
    write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise)
     

    Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter

    bind, close, connect, deregister, disconnect, flush, read

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, exceptionCaught, 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

    exceptionCaught, handlerAdded, handlerRemoved
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
    • MAX_EXPIRY_DELTA

      protected static final com.netflix.config.CachedDynamicLongProperty MAX_EXPIRY_DELTA
    • connectionCloseType

      protected final ConnectionCloseType connectionCloseType
    • maxRequests

      protected final int maxRequests
    • maxExpiry

      protected final int maxExpiry
    • connectionStartTime

      protected final long connectionStartTime
    • connectionExpiryTime

      protected final long connectionExpiryTime
    • requestCount

      protected int requestCount
    • maxRequestsUnderBrownout

      protected int maxRequestsUnderBrownout
  • Constructor Details

    • AbstrHttpConnectionExpiryHandler

      public AbstrHttpConnectionExpiryHandler(ConnectionCloseType connectionCloseType, int maxRequestsUnderBrownout, int maxRequests, int maxExpiry)
  • Method Details

    • write

      public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception
      Specified by:
      write in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      write in class io.netty.channel.ChannelOutboundHandlerAdapter
      Throws:
      Exception
    • isConnectionExpired

      protected boolean isConnectionExpired(io.netty.channel.Channel channel)
    • isResponseHeaders

      protected abstract boolean isResponseHeaders(Object msg)
    • maxRequests

      protected int maxRequests(io.netty.channel.Channel ch)