in src/main/java/org/apache/tinkerpop/gremlin/driver/SigV4WebSocketChannelizer.java [167:190]
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));
// Add compression extension for WebSocket defined in https://tools.ietf.org/html/rfc7692
pipeline.addLast(WEBSOCKET_COMPRESSION_HANDLER, WebSocketClientCompressionHandler.INSTANCE);
pipeline.addLast(WEB_SOCKET_HANDLER, handler);
pipeline.addLast(GREMLIN_ENCODER, webSocketGremlinRequestEncoder);
pipeline.addLast(GRELIN_DECODER, webSocketGremlinResponseDecoder);
}