@Override
    public void configure(final ChannelPipeline pipeline) {
        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("log-io", LogLevel.DEBUG));

        pipeline.addLast("http-server", new HttpServerCodec());

        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("http-io", LogLevel.DEBUG));

        pipeline.addLast("http-requestid-handler", httpRequestIdHandler);
        pipeline.addLast("http-keepalive-handler", new HttpServerKeepAliveHandler());
        pipeline.addLast("http-cors-handler", new CorsHandler(CorsConfigBuilder.forAnyOrigin().build()));

        final HttpObjectAggregator aggregator = new HttpObjectAggregator(settings.maxRequestContentLength);
        aggregator.setMaxCumulationBufferComponents(settings.maxAccumulationBufferComponents);
        pipeline.addLast(PIPELINE_HTTP_AGGREGATOR, aggregator);
        pipeline.addLast("http-request-checker", httpRequestCheckingHandler);
        pipeline.addLast("http-user-agent-handler", new HttpUserAgentHandler());
        pipeline.addLast("http-compression-handler", httpContentEncoder);

        if (authenticator != null) {
            // Cannot add the same handler instance multiple times unless
            // it is marked as @Sharable, indicating a race condition will
            // not occur. It may not be a safe assumption that the handler
            // is sharable so create a new handler each time.
            final AbstractAuthenticationHandler authenticationHandler = authenticator.getClass() == AllowAllAuthenticator.class ?
                    null : instantiateAuthenticationHandler(settings);
            if (authenticationHandler != null)
                pipeline.addLast(PIPELINE_AUTHENTICATOR, authenticationHandler);
        }

        // The authorizer needs access to the RequestMessage but the authenticator doesn't.
        pipeline.addLast("http-requestmessage-decoder", httpRequestMessageDecoder);

        if (authorizer != null) {
            final ChannelInboundHandlerAdapter authorizationHandler = new HttpBasicAuthorizationHandler(authorizer);
            pipeline.addLast(PIPELINE_AUTHORIZER, authorizationHandler);
        }

        pipeline.addLast("http-gremlin-handler", httpGremlinEndpointHandler);
        // Note that channelRead()'s do not propagate down the pipeline past HttpGremlinEndpointHandler
    }
Constructs a {@link Channelizer} that exposes an HTTP endpoint in Gremlin Server.

@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java