Class TcpTransportFactory
- java.lang.Object
-
- org.apache.activemq.transport.TransportFactory
-
- org.apache.activemq.transport.tcp.TcpTransportFactory
-
- Direct Known Subclasses:
NIOTransportFactory
,SslTransportFactory
public class TcpTransportFactory extends TransportFactory
-
-
Constructor Summary
Constructors Constructor Description TcpTransportFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transport
compositeConfigure(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 Transport
createInactivityMonitor(Transport transport, WireFormat format)
protected ServerSocketFactory
createServerSocketFactory()
protected SocketFactory
createSocketFactory()
protected TcpTransport
createTcpTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation)
Allows subclasses of TcpTransportFactory to provide a create custom TcpTransport instances.protected TcpTransportServer
createTcpTransportServer(URI location, ServerSocketFactory serverSocketFactory)
Allows subclasses of TcpTransportFactory to create custom instances of TcpTransportServer.protected Transport
createTransport(URI location, WireFormat wf)
Factory method to create a new transportTcpTransport
createTransport(WireFormat wireFormat, Socket socket, SSLEngine engine, TcpTransport.InitBuffer initBuffer, ByteBuffer inputBuffer)
TcpTransport
createTransport(WireFormat wireFormat, Socket socket, TcpTransport.InitBuffer initBuffer)
TransportServer
doBind(URI location)
protected boolean
isUseInactivityMonitor(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
-
-
-
-
Constructor Detail
-
TcpTransportFactory
public TcpTransportFactory()
-
-
Method Detail
-
doBind
public TransportServer doBind(URI location) throws IOException
- Specified by:
doBind
in 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:
IOException
URISyntaxException
-
compositeConfigure
public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
Description copied from class:TransportFactory
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.- Overrides:
compositeConfigure
in 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:TransportFactory
Factory method to create a new transport- Overrides:
createTransport
in classTransportFactory
- Throws:
UnknownHostException
IOException
-
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:
UnknownHostException
IOException
-
createServerSocketFactory
protected ServerSocketFactory createServerSocketFactory() throws IOException
- Throws:
IOException
-
createSocketFactory
protected SocketFactory createSocketFactory() throws IOException
- Throws:
IOException
-
createInactivityMonitor
protected Transport createInactivityMonitor(Transport transport, WireFormat format)
-
-