Class NettyWsTransport
- java.lang.Object
-
- org.apache.qpid.jms.transports.netty.NettyTcpTransport
-
- org.apache.qpid.jms.transports.netty.NettyWsTransport
-
- All Implemented Interfaces:
Transport
public class NettyWsTransport extends NettyTcpTransport
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
Constructors Constructor Description NettyWsTransport(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAdditionalHandlers(io.netty.channel.ChannelPipeline pipeline)protected io.netty.channel.ChannelInboundHandlerAdaptercreateChannelHandler()protected 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 operations-
Methods 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 Detail
-
NettyWsTransport
public NettyWsTransport(URI remoteLocation, TransportOptions options, boolean secure)
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 Detail
-
write
public void write(io.netty.buffer.ByteBuf output) throws IOExceptionDescription 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
public void writeAndFlush(io.netty.buffer.ByteBuf output) throws IOExceptionDescription 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
protected void handleConnected(io.netty.channel.Channel channel) throws Exception- Overrides:
handleConnectedin classNettyTcpTransport- Throws:
Exception
-
handleChannelInactive
protected void handleChannelInactive(io.netty.channel.Channel channel) throws Exception- Overrides:
handleChannelInactivein classNettyTcpTransport- Throws:
Exception
-
-