Class HttpGremlinEndpointHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    @Sharable
    public class HttpGremlinEndpointHandler
    extends io.netty.channel.SimpleChannelInboundHandler<RequestMessage>
    Handler that processes RequestMessage. This handler will attempt to execute the query and stream the results back in HTTP chunks to the client.
    Author:
    Stephen Mallette (http://stephen.genoprime.com)
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HttpGremlinEndpointHandler.RequestState  
      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

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

      Fields 
      Modifier and Type Field Description
      protected static Set<String> INVALID_BINDINGS_KEYS  
      static long WRITE_PAUSE_TIME_MS
      Length of time to pause writes in milliseconds when the high watermark is exceeded.
      static com.codahale.metrics.Meter writePausesMeter
      Tracks the rate of pause to writes when the high watermark is exceeded.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelRead0​(io.netty.channel.ChannelHandlerContext ctx, RequestMessage requestMessage)  
      void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)  
      • Methods inherited from class io.netty.channel.SimpleChannelInboundHandler

        acceptInboundMessage, channelRead
      • 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 interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Field Detail

      • WRITE_PAUSE_TIME_MS

        public static final long WRITE_PAUSE_TIME_MS
        Length of time to pause writes in milliseconds when the high watermark is exceeded.
        See Also:
        Constant Field Values
      • writePausesMeter

        public static final com.codahale.metrics.Meter writePausesMeter
        Tracks the rate of pause to writes when the high watermark is exceeded.
      • INVALID_BINDINGS_KEYS

        protected static final Set<String> INVALID_BINDINGS_KEYS
    • Method Detail

      • channelRead0

        public void channelRead0​(io.netty.channel.ChannelHandlerContext ctx,
                                 RequestMessage requestMessage)
        Specified by:
        channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<RequestMessage>
      • exceptionCaught

        public void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,
                                    Throwable cause)
        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