public void configure()

in gremlin/gremlin-java-client-demo/src/main/java/org/apache/tinkerpop/gremlin/driver/LBAwareSigV4WebSocketChannelizer.java [136:157]


    public void configure(final ChannelPipeline pipeline) {
        final String scheme = connection.getUri().getScheme();
        if (!WEB_SOCKET.equalsIgnoreCase(scheme) && !WEB_SOCKET_SECURE.equalsIgnoreCase(scheme)) {
            throw new IllegalStateException(String.format("Unsupported scheme (only %s: or %s: supported): %s",
                    WEB_SOCKET, WEB_SOCKET_SECURE, scheme));
        }

        if (!supportsSsl() && WEB_SOCKET_SECURE.equalsIgnoreCase(scheme)) {
            throw new IllegalStateException(String.format("To use %s scheme ensure that enableSsl is set to true in "
                            + "configuration",
                    WEB_SOCKET_SECURE));
        }

        final int maxContentLength = cluster.connectionPoolSettings().maxContentLength;
        handler = createHandler();

        pipeline.addLast(HTTP_CODEC, new HttpClientCodec());
        pipeline.addLast(AGGREGATOR, new HttpObjectAggregator(maxContentLength));
        pipeline.addLast(WEB_SOCKET_HANDLER, handler);
        pipeline.addLast(GREMLIN_ENCODER, webSocketGremlinRequestEncoder);
        pipeline.addLast(GRELIN_DECODER, webSocketGremlinResponseDecoder);
    }