Package org.apache.activemq.transport.ws
Class AbstractMQTTSocket
java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.transport.TransportSupport
org.apache.activemq.transport.ws.AbstractMQTTSocket
- All Implemented Interfaces:
org.apache.activemq.broker.BrokerServiceAware,org.apache.activemq.Service,MQTTTransport,org.apache.activemq.transport.Transport
- Direct Known Subclasses:
MQTTSocket
public abstract class AbstractMQTTSocket
extends org.apache.activemq.transport.TransportSupport
implements MQTTTransport, org.apache.activemq.broker.BrokerServiceAware
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.activemq.broker.BrokerServiceprotected final MQTTInactivityMonitorprotected X509Certificate[]protected MQTTProtocolConverterprotected ReentrantLockprotected intprotected final Stringprotected final CountDownLatchprotected MQTTWireFormat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoStart()protected voiddoStop(ServiceStopper stopper) protected MQTTProtocolConverterintabstract voidCalled when the transport is stopping to allow the dervied classes a chance to close WebSocket resources.voidvoidsendToActiveMQ(org.apache.activemq.command.Command command) abstract voidsendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command) voidsetBrokerService(org.apache.activemq.broker.BrokerService brokerService) voidsetPeerCertificates(X509Certificate[] certificates) voidsetTransportOptions(Map<String, Object> transportOptions) protected booleanMethods inherited from class org.apache.activemq.transport.TransportSupport
asyncRequest, checkStarted, doConsume, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, request, setTransportListener, updateURIsMethods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.transport.mqtt.MQTTTransport
onException, stopMethods inherited from interface org.apache.activemq.Service
start, stop
-
Field Details
-
protocolLock
-
protocolConverter
-
wireFormat
-
mqttInactivityMonitor
-
socketTransportStarted
-
brokerService
protected org.apache.activemq.broker.BrokerService brokerService -
receiveCounter
protected volatile int receiveCounter -
remoteAddress
-
peerCertificates
-
-
Constructor Details
-
AbstractMQTTSocket
-
-
Method Details
-
oneway
- Specified by:
onewayin interfaceorg.apache.activemq.transport.Transport- Throws:
IOException
-
sendToActiveMQ
public void sendToActiveMQ(org.apache.activemq.command.Command command) - Specified by:
sendToActiveMQin interfaceMQTTTransport
-
doStop
- Specified by:
doStopin classServiceSupport- Throws:
Exception
-
doStart
- Specified by:
doStartin classServiceSupport- Throws:
Exception
-
sendToMQTT
- Specified by:
sendToMQTTin interfaceMQTTTransport- Throws:
IOException
-
handleStopped
Called when the transport is stopping to allow the dervied classes a chance to close WebSocket resources.- Throws:
IOException- if an error occurs during the stop.
-
getInactivityMonitor
- Specified by:
getInactivityMonitorin interfaceMQTTTransport
-
getWireFormat
- Specified by:
getWireFormatin interfaceMQTTTransport- Specified by:
getWireFormatin interfaceorg.apache.activemq.transport.Transport
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceorg.apache.activemq.transport.Transport
-
getReceiveCounter
public int getReceiveCounter()- Specified by:
getReceiveCounterin interfaceorg.apache.activemq.transport.Transport
-
getPeerCertificates
- Specified by:
getPeerCertificatesin interfaceMQTTTransport- Specified by:
getPeerCertificatesin interfaceorg.apache.activemq.transport.Transport
-
setPeerCertificates
- Specified by:
setPeerCertificatesin interfaceMQTTTransport- Specified by:
setPeerCertificatesin interfaceorg.apache.activemq.transport.Transport
-
setBrokerService
public void setBrokerService(org.apache.activemq.broker.BrokerService brokerService) - Specified by:
setBrokerServicein interfaceorg.apache.activemq.broker.BrokerServiceAware
-
getProtocolConverter
-
transportStartedAtLeastOnce
protected boolean transportStartedAtLeastOnce() -
setTransportOptions
-