Class MQTTNIOTransportFactory
- java.lang.Object
-
- org.apache.activemq.transport.TransportFactory
-
- org.apache.activemq.transport.tcp.TcpTransportFactory
-
- org.apache.activemq.transport.nio.NIOTransportFactory
-
- org.apache.activemq.transport.mqtt.MQTTNIOTransportFactory
-
- All Implemented Interfaces:
BrokerServiceAware
- Direct Known Subclasses:
MQTTNIOSSLTransportFactory
public class MQTTNIOTransportFactory extends NIOTransportFactory implements BrokerServiceAware
A MQTT over NIO transport factory
-
-
Constructor Summary
Constructors Constructor Description MQTTNIOTransportFactory()
-
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 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.TcpTransport
createTransport(WireFormat wireFormat, Socket socket, TcpTransport.InitBuffer initBuffer)
protected String
getDefaultWireFormatType()
Transport
serverConfigure(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.void
setBrokerService(BrokerService brokerService)
-
Methods inherited from class org.apache.activemq.transport.nio.NIOTransportFactory
createServerSocketFactory, createSocketFactory
-
Methods inherited from class org.apache.activemq.transport.tcp.TcpTransportFactory
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:
getDefaultWireFormatType
in classTransportFactory
-
createTcpTransportServer
protected TcpTransportServer createTcpTransportServer(URI location, ServerSocketFactory serverSocketFactory) throws IOException, URISyntaxException
Description copied from class:TcpTransportFactory
Allows subclasses of TcpTransportFactory to create custom instances of TcpTransportServer.- Overrides:
createTcpTransportServer
in classNIOTransportFactory
- Returns:
- a new TcpTransportServer instance.
- Throws:
IOException
URISyntaxException
-
createTcpTransport
protected TcpTransport createTcpTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation) throws UnknownHostException, IOException
Description copied from class:TcpTransportFactory
Allows subclasses of TcpTransportFactory to provide a create custom TcpTransport instances.- Overrides:
createTcpTransport
in classNIOTransportFactory
- Returns:
- a new TcpTransport instance connected to the given location.
- Throws:
UnknownHostException
IOException
-
createTransport
public TcpTransport createTransport(WireFormat wireFormat, Socket socket, TcpTransport.InitBuffer initBuffer) throws IOException
- Overrides:
createTransport
in classNIOTransportFactory
- Throws:
IOException
-
serverConfigure
public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception
Description copied from class:TransportFactory
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.- Overrides:
serverConfigure
in classTransportFactory
- Returns:
- Throws:
Exception
-
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 classTcpTransportFactory
- Returns:
-
setBrokerService
public void setBrokerService(BrokerService brokerService)
- Specified by:
setBrokerService
in interfaceBrokerServiceAware
-
createInactivityMonitor
protected Transport createInactivityMonitor(Transport transport, WireFormat format)
- Overrides:
createInactivityMonitor
in classTcpTransportFactory
-
-