Class WebSocketTransport
java.lang.Object
org.apache.qpid.protonj2.client.transport.netty5.TcpTransport
org.apache.qpid.protonj2.client.transport.netty5.WebSocketTransport
- All Implemented Interfaces:
Transport
Netty based WebSockets Transport that wraps and extends the TCP Transport.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.qpid.protonj2.client.transport.netty5.TcpTransport
TcpTransport.NettyDefaultHandler<E>, TcpTransport.NettyTcpTransportHandler
-
Field Summary
Fields inherited from class org.apache.qpid.protonj2.client.transport.netty5.TcpTransport
bootstrap, channel, closed, connected, connectedLatch, failureCause, host, listener, nettyAllocator, options, port, sslOptions
-
Constructor Summary
ConstructorDescriptionWebSocketTransport
(io.netty5.bootstrap.Bootstrap bootstrap, TransportOptions options, SslOptions sslOptions) Create a newWebSocketTransport
instance with the given configuration. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAdditionalHandlers
(io.netty5.channel.ChannelPipeline pipeline) protected io.netty5.channel.ChannelHandler
Returns a URI that contains some meaningful information about the remote connection such as a scheme that reflects the transport type and the remote host and port that the connection was instructed to connect to.protected String
protected void
handleConnected
(io.netty5.channel.Channel channel) Methods inherited from class org.apache.qpid.protonj2.client.transport.netty5.TcpTransport
awaitConnect, checkConnected, close, connect, flush, getBufferAllocator, getHost, getLocalPrincipal, getPort, getSslOptions, getTransportListener, getTransportOptions, handleTransportFailure, isConnected, isSecure, write, write, writeAndFlush, writeAndFlush
-
Constructor Details
-
WebSocketTransport
public WebSocketTransport(io.netty5.bootstrap.Bootstrap bootstrap, TransportOptions options, SslOptions sslOptions) Create a newWebSocketTransport
instance with the given configuration.- Parameters:
bootstrap
- theBootstrap
that this transport's IO is bound to.options
- theTransportOptions
used to configure the socket connection.sslOptions
- theSslOptions
to use if the options indicate SSL is enabled.
-
-
Method Details
-
getRemoteURI
Description copied from interface:Transport
Returns a URI that contains some meaningful information about the remote connection such as a scheme that reflects the transport type and the remote host and port that the connection was instructed to connect to. If called before theTransport.connect(String, int, TransportListener)
method this method returnsnull
.- Specified by:
getRemoteURI
in interfaceTransport
- Overrides:
getRemoteURI
in classTcpTransport
- Returns:
- a URI that reflects a meaningful view of the
Transport
remote connection details.
-
createChannelHandler
protected io.netty5.channel.ChannelHandler createChannelHandler()- Overrides:
createChannelHandler
in classTcpTransport
-
addAdditionalHandlers
protected void addAdditionalHandlers(io.netty5.channel.ChannelPipeline pipeline) - Overrides:
addAdditionalHandlers
in classTcpTransport
-
handleConnected
- Overrides:
handleConnected
in classTcpTransport
- Throws:
Exception
-
getScheme
- Overrides:
getScheme
in classTcpTransport
-