Class MQTTTransportFactory
- java.lang.Object
-
- org.apache.activemq.transport.TransportFactory
-
- org.apache.activemq.transport.tcp.TcpTransportFactory
-
- org.apache.activemq.transport.mqtt.MQTTTransportFactory
-
- All Implemented Interfaces:
BrokerServiceAware
public class MQTTTransportFactory extends TcpTransportFactory implements BrokerServiceAware
A MQTT transport factory
-
-
Constructor Summary
Constructors Constructor Description MQTTTransportFactory()
-
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 TcpTransportServercreateTcpTransportServer(URI location, ServerSocketFactory serverSocketFactory)Allows subclasses of TcpTransportFactory to create custom instances of TcpTransportServer.protected StringgetDefaultWireFormatType()TransportserverConfigure(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.voidsetBrokerService(BrokerService brokerService)-
Methods inherited from class org.apache.activemq.transport.tcp.TcpTransportFactory
createServerSocketFactory, createSocketFactory, createTcpTransport, createTransport, createTransport, createTransport, doBind, isUseInactivityMonitor
-
Methods inherited from class org.apache.activemq.transport.TransportFactory
bind, compositeConnect, compositeConnect, configure, connect, connect, createWireFormat, createWireFormatFactory, doCompositeConnect, doCompositeConnect, doConnect, doConnect, findTransportFactory, getOption, registerTransportFactory
-
-
-
-
Method Detail
-
getDefaultWireFormatType
protected String getDefaultWireFormatType()
- Overrides:
getDefaultWireFormatTypein classTransportFactory
-
createTcpTransportServer
protected TcpTransportServer createTcpTransportServer(URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException
Description copied from class:TcpTransportFactoryAllows subclasses of TcpTransportFactory to create custom instances of TcpTransportServer.- Overrides:
createTcpTransportServerin classTcpTransportFactory- 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 classTcpTransportFactory- Returns:
-
setBrokerService
public void setBrokerService(BrokerService brokerService)
- Specified by:
setBrokerServicein interfaceBrokerServiceAware
-
serverConfigure
public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception
Description copied from class:TransportFactoryFully 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.- Overrides:
serverConfigurein classTransportFactory- Returns:
- Throws:
Exception
-
createInactivityMonitor
protected Transport createInactivityMonitor(Transport transport, WireFormat format)
- Overrides:
createInactivityMonitorin classTcpTransportFactory
-
-