Class NettyWsTransport
java.lang.Object
org.apache.qpid.jms.transports.netty.NettyTcpTransport
org.apache.qpid.jms.transports.netty.NettyWsTransport
- 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.jms.transports.netty.NettyTcpTransport
NettyTcpTransport.NettyDefaultHandler<E>, NettyTcpTransport.NettyTcpTransportHandler -
Field Summary
Fields inherited from class org.apache.qpid.jms.transports.netty.NettyTcpTransport
channel, DEFAULT_MAX_FRAME_SIZE, groupRef, ioThreadfactory, listener, maxFrameSize -
Constructor Summary
ConstructorsConstructorDescriptionNettyWsTransport(URI remoteLocation, TransportOptions options, boolean secure) Create a new transport instanceNettyWsTransport(TransportListener listener, URI remoteLocation, TransportOptions options, boolean secure) Create a new transport instance -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAdditionalHandlers(io.netty.channel.ChannelPipeline pipeline) protected io.netty.channel.ChannelInboundHandlerAdapterprotected voidhandleChannelInactive(io.netty.channel.Channel channel) protected voidhandleConnected(io.netty.channel.Channel channel) voidwrite(io.netty.buffer.ByteBuf output) Writes a chunk of data over the Transport connection without performing an explicit flush on the transport.voidwriteAndFlush(io.netty.buffer.ByteBuf output) Writes a chunk of data over the Transport connection and requests a flush of all pending queued write operationsMethods inherited from class org.apache.qpid.jms.transports.netty.NettyTcpTransport
allocateSendBuffer, checkConnected, close, connect, flush, getLocalPrincipal, getMaxFrameSize, getRemoteHost, getRemoteLocation, getRemotePort, getThreadFactory, getTransportListener, getTransportOptions, handleException, isConnected, isSecure, setMaxFrameSize, setThreadFactory, setTransportListener
-
Constructor Details
-
NettyWsTransport
Create a new transport instance- Parameters:
remoteLocation- the URI that defines the remote resource to connect to.options- the transport options used to configure the socket connection.secure- should the transport enable an SSL layer.
-
NettyWsTransport
public NettyWsTransport(TransportListener listener, URI remoteLocation, TransportOptions options, boolean secure) Create a new transport instance- Parameters:
listener- the TransportListener that will receive events from this Transport.remoteLocation- the URI that defines the remote resource to connect to.options- the transport options used to configure the socket connection.secure- should the transport enable an SSL layer.
-
-
Method Details
-
write
Description copied from interface:TransportWrites a chunk of data over the Transport connection without performing an explicit flush on the transport.- Specified by:
writein interfaceTransport- Overrides:
writein classNettyTcpTransport- Parameters:
output- The buffer of data that is to be transmitted.- Throws:
IOException- if an error occurs during the write operation.
-
writeAndFlush
Description copied from interface:TransportWrites a chunk of data over the Transport connection and requests a flush of all pending queued write operations- Specified by:
writeAndFlushin interfaceTransport- Overrides:
writeAndFlushin classNettyTcpTransport- Parameters:
output- The buffer of data that is to be transmitted.- Throws:
IOException- if an error occurs during the write operation.
-
createChannelHandler
protected io.netty.channel.ChannelInboundHandlerAdapter createChannelHandler()- Overrides:
createChannelHandlerin classNettyTcpTransport
-
addAdditionalHandlers
protected void addAdditionalHandlers(io.netty.channel.ChannelPipeline pipeline) - Overrides:
addAdditionalHandlersin classNettyTcpTransport
-
handleConnected
- Overrides:
handleConnectedin classNettyTcpTransport- Throws:
Exception
-
handleChannelInactive
- Overrides:
handleChannelInactivein classNettyTcpTransport- Throws:
Exception
-