Class SigV4WebSocketChannelizer
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
-
- org.apache.tinkerpop.gremlin.driver.Channelizer.AbstractChannelizer
-
- org.apache.tinkerpop.gremlin.driver.SigV4WebSocketChannelizer
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,org.apache.tinkerpop.gremlin.driver.Channelizer
public class SigV4WebSocketChannelizer extends org.apache.tinkerpop.gremlin.driver.Channelizer.AbstractChannelizerAnChannelizer.AbstractChannelizer, with most of the code fromChannelizer.WebSocketChannelizer. Except it uses a different WebSocketClientHandshaker which uses SIGV4 auth. This class should be used as a Channelizer when SIGV4 auth is enabled.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.driver.Channelizer
org.apache.tinkerpop.gremlin.driver.Channelizer.AbstractChannelizer, org.apache.tinkerpop.gremlin.driver.Channelizer.NioChannelizer, org.apache.tinkerpop.gremlin.driver.Channelizer.WebSocketChannelizer
-
-
Field Summary
Fields Modifier and Type Field Description static StringWEBSOCKET_COMPRESSION_HANDLERName of the WebSocket compression handler.
-
Constructor Summary
Constructors Constructor Description SigV4WebSocketChannelizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose(io.netty.channel.Channel channel)Sends aCloseWebSocketFrameto the server for the specified channel.voidconfigure(io.netty.channel.ChannelPipeline pipeline)voidconnected()ObjectcreateKeepAliveMessage()protected com.amazonaws.auth.AWSCredentialsProvidergetCredentialsProvider()This protected method provides a way for customizing the channelize through inheritance to override credentials used to establish sign requestsvoidinit(org.apache.tinkerpop.gremlin.driver.Connection connection)Initializes the channelizer.booleansupportsKeepAlive()Keep-alive is supported through the ping/pong websocket protocol.booleansupportsSsl()-
Methods inherited from class org.apache.tinkerpop.gremlin.driver.Channelizer.AbstractChannelizer
finalize, initChannel
-
Methods inherited from class io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemoved
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
-
-
-
Field Detail
-
WEBSOCKET_COMPRESSION_HANDLER
public static final String WEBSOCKET_COMPRESSION_HANDLER
Name of the WebSocket compression handler.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(org.apache.tinkerpop.gremlin.driver.Connection connection)
Initializes the channelizer.- Specified by:
initin interfaceorg.apache.tinkerpop.gremlin.driver.Channelizer- Overrides:
initin classorg.apache.tinkerpop.gremlin.driver.Channelizer.AbstractChannelizer- Parameters:
connection- theConnectionobject.
-
supportsKeepAlive
public boolean supportsKeepAlive()
Keep-alive is supported through the ping/pong websocket protocol.- See Also:
- IETF RFC 6455
-
createKeepAliveMessage
public Object createKeepAliveMessage()
-
close
public void close(io.netty.channel.Channel channel)
Sends aCloseWebSocketFrameto the server for the specified channel.- Specified by:
closein interfaceorg.apache.tinkerpop.gremlin.driver.Channelizer- Overrides:
closein classorg.apache.tinkerpop.gremlin.driver.Channelizer.AbstractChannelizer
-
supportsSsl
public boolean supportsSsl()
- Overrides:
supportsSslin classorg.apache.tinkerpop.gremlin.driver.Channelizer.AbstractChannelizer
-
configure
public void configure(io.netty.channel.ChannelPipeline pipeline)
- Specified by:
configurein classorg.apache.tinkerpop.gremlin.driver.Channelizer.AbstractChannelizer
-
connected
public void connected()
-
getCredentialsProvider
protected com.amazonaws.auth.AWSCredentialsProvider getCredentialsProvider()
This protected method provides a way for customizing the channelize through inheritance to override credentials used to establish sign requests- Returns:
- credentials provider that will be used to generate SigV4 signatures
-
-