Class TcpTransportFactory
- java.lang.Object
-
- org.apache.activemq.transport.TransportFactory
-
- org.apache.activemq.transport.tcp.TcpTransportFactory
-
- Direct Known Subclasses:
AmqpTransportFactory,AutoTcpTransportFactory,MQTTTransportFactory,NIOTransportFactory,SslTransportFactory,StompTransportFactory
public class TcpTransportFactory extends TransportFactory
-
-
Constructor Summary
Constructors Constructor Description TcpTransportFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransportcompositeConfigure(Transport transport, WireFormat format, Map options)Similar to configure(...) but this avoid adding in the MutexTransport and ResponseCorrelator transport layers so that the resulting transport can more efficiently be used as part of a composite transport.protected TransportcreateInactivityMonitor(Transport transport, WireFormat format)protected ServerSocketFactorycreateServerSocketFactory()protected SocketFactorycreateSocketFactory()protected TcpTransportcreateTcpTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation)Allows subclasses of TcpTransportFactory to provide a create custom TcpTransport instances.protected TcpTransportServercreateTcpTransportServer(URI location, ServerSocketFactory serverSocketFactory)Allows subclasses of TcpTransportFactory to create custom instances of TcpTransportServer.protected TransportcreateTransport(URI location, WireFormat wf)Factory method to create a new transportTcpTransportcreateTransport(WireFormat wireFormat, Socket socket, SSLEngine engine, TcpTransport.InitBuffer initBuffer, ByteBuffer inputBuffer)TcpTransportcreateTransport(WireFormat wireFormat, Socket socket, TcpTransport.InitBuffer initBuffer)TransportServerdoBind(URI location)protected booleanisUseInactivityMonitor(Transport transport)-
Methods inherited from class org.apache.activemq.transport.TransportFactory
bind, compositeConnect, compositeConnect, configure, connect, connect, createWireFormat, createWireFormatFactory, doCompositeConnect, doCompositeConnect, doConnect, doConnect, findTransportFactory, getDefaultWireFormatType, getOption, registerTransportFactory, serverConfigure
-
-
-
-
Method Detail
-
doBind
public TransportServer doBind(URI location) throws IOException
- Specified by:
doBindin classTransportFactory- Throws:
IOException
-
createTcpTransportServer
protected TcpTransportServer createTcpTransportServer(URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException
Allows subclasses of TcpTransportFactory to create custom instances of TcpTransportServer.- Parameters:
location-serverSocketFactory-- Returns:
- a new TcpTransportServer instance.
- Throws:
IOExceptionURISyntaxException
-
compositeConfigure
public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
Description copied from class:TransportFactorySimilar to configure(...) but this avoid adding in the MutexTransport and ResponseCorrelator transport layers so that the resulting transport can more efficiently be used as part of a composite transport.- Overrides:
compositeConfigurein classTransportFactory- Returns:
-
isUseInactivityMonitor
protected boolean isUseInactivityMonitor(Transport transport)
- Returns:
- true if the inactivity monitor should be used on the transport
-
createTransport
protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException
Description copied from class:TransportFactoryFactory method to create a new transport- Overrides:
createTransportin classTransportFactory- Throws:
UnknownHostExceptionIOException
-
createTransport
public TcpTransport createTransport(WireFormat wireFormat, Socket socket, TcpTransport.InitBuffer initBuffer) throws IOException
- Throws:
IOException
-
createTransport
public TcpTransport createTransport(WireFormat wireFormat, Socket socket, SSLEngine engine, TcpTransport.InitBuffer initBuffer, ByteBuffer inputBuffer) throws IOException
- Throws:
IOException
-
createTcpTransport
protected TcpTransport createTcpTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation) throws UnknownHostException, IOException
Allows subclasses of TcpTransportFactory to provide a create custom TcpTransport instances.- Parameters:
wf-socketFactory-location-localLocation-- Returns:
- a new TcpTransport instance connected to the given location.
- Throws:
UnknownHostExceptionIOException
-
createServerSocketFactory
protected ServerSocketFactory createServerSocketFactory() throws IOException
- Throws:
IOException
-
createSocketFactory
protected SocketFactory createSocketFactory() throws IOException
- Throws:
IOException
-
createInactivityMonitor
protected Transport createInactivityMonitor(Transport transport, WireFormat format)
-
-