@Override
        public void init(final Connection connection) {
            super.init(connection);

            httpCompressionDecoder = new HttpContentDecompressionHandler();
            gremlinRequestEncoder = new HttpGremlinRequestEncoder(cluster.getSerializer(), cluster.getRequestInterceptors(),
                    cluster.isUserAgentOnConnectEnabled(), cluster.isBulkResultsEnabled(), connection.getUri());
            gremlinResponseDecoder = new HttpGremlinResponseDecoder(cluster.getSerializer());
            if (cluster.getIdleConnectionTimeout() > 0) {
                final int idleConnectionTimeout = (int) (cluster.getIdleConnectionTimeout() / 1000);
                idleStateHandler = new IdleStateHandler(idleConnectionTimeout, idleConnectionTimeout, 0);
                idleConnectionHandler = new IdleConnectionHandler();
            }
        }
This response is used as a signal for determining if all content of the response has been read.
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java