Package org.apache.activemq.transport
Class TransportFactory
java.lang.Object
org.apache.activemq.transport.TransportFactory
- Direct Known Subclasses:
FailoverTransportFactory,FanoutTransportFactory,MockTransportFactory,TcpTransportFactory,UdpTransportFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TransportServercompositeConfigure(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.static TransportcompositeConnect(URI location) Creates a slimmed down transport that is more efficient so that it can be used by composite transports like reliable and HA.static TransportcompositeConnect(URI location, Executor ex) Creates a slimmed down transport that is more efficient so that it can be used by composite transports like reliable and HA.configure(Transport transport, WireFormat wf, Map options) Fully configures and adds all need transport filters so that the transport can be used by the JMS client.static TransportCreates a normal transport.static TransportCreates a normal transport.protected TransportcreateTransport(URI location, WireFormat wf) Factory method to create a new transportprotected WireFormatcreateWireFormat(Map<String, String> options) protected WireFormatFactorycreateWireFormatFactory(Map<String, String> options) abstract TransportServerdoCompositeConnect(URI location) doCompositeConnect(URI location, Executor ex) static TransportFactoryfindTransportFactory(URI location) protected Stringprotected Stringstatic voidregisterTransportFactory(String scheme, TransportFactory tf) Allow registration of a transport factory without wiring via META-INF classesserverConfigure(Transport transport, WireFormat format, HashMap options) Fully configures and adds all need transport filters so that the transport can be used by the ActiveMQ message broker.
-
Constructor Details
-
TransportFactory
public TransportFactory()
-
-
Method Details
-
doBind
- Throws:
IOException
-
doConnect
- Throws:
Exception
-
doCompositeConnect
- Throws:
Exception
-
connect
Creates a normal transport.- Parameters:
location-- Returns:
- the transport
- Throws:
Exception
-
connect
Creates a normal transport.- Parameters:
location-ex-- Returns:
- the transport
- Throws:
Exception
-
compositeConnect
Creates a slimmed down transport that is more efficient so that it can be used by composite transports like reliable and HA.- Parameters:
location-- Returns:
- the Transport
- Throws:
Exception
-
compositeConnect
Creates a slimmed down transport that is more efficient so that it can be used by composite transports like reliable and HA.- Parameters:
location-ex-- Returns:
- the Transport
- Throws:
Exception
-
bind
- Throws:
IOException
-
doConnect
- Throws:
Exception
-
doCompositeConnect
- Throws:
Exception
-
registerTransportFactory
Allow registration of a transport factory without wiring via META-INF classes- Parameters:
scheme-tf-
-
createTransport
protected Transport createTransport(URI location, WireFormat wf) throws MalformedURLException, UnknownHostException, IOException Factory method to create a new transport -
findTransportFactory
- Parameters:
location-- Returns:
- Throws:
IOException
-
createWireFormat
- Throws:
IOException
-
createWireFormatFactory
- Throws:
IOException
-
getDefaultWireFormatType
-
configure
Fully configures and adds all need transport filters so that the transport can be used by the JMS client.- Parameters:
transport-wf-options-- Returns:
- Throws:
Exception
-
serverConfigure
public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception Fully configures and adds all need transport filters so that the transport can be used by the ActiveMQ message broker. The main difference between this and the configure() method is that the broker does not issue requests to the client so the ResponseCorrelator is not needed.- Parameters:
transport-format-options-- Returns:
- Throws:
Exception
-
compositeConfigure
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.- Parameters:
transport-format-options-- Returns:
-
getOption
-