public abstract class AbstractMQTTSocket extends org.apache.activemq.transport.TransportSupport implements MQTTTransport, org.apache.activemq.broker.BrokerServiceAware
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.activemq.broker.BrokerService |
brokerService |
protected MQTTInactivityMonitor |
mqttInactivityMonitor |
protected X509Certificate[] |
peerCertificates |
protected MQTTProtocolConverter |
protocolConverter |
protected ReentrantLock |
protocolLock |
protected int |
receiveCounter |
protected String |
remoteAddress |
protected CountDownLatch |
socketTransportStarted |
protected MQTTWireFormat |
wireFormat |
| Constructor and Description |
|---|
AbstractMQTTSocket(String remoteAddress) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
protected void |
doStop(org.apache.activemq.util.ServiceStopper stopper) |
MQTTInactivityMonitor |
getInactivityMonitor() |
X509Certificate[] |
getPeerCertificates() |
protected MQTTProtocolConverter |
getProtocolConverter() |
int |
getReceiveCounter() |
String |
getRemoteAddress() |
MQTTWireFormat |
getWireFormat() |
abstract void |
handleStopped()
Called when the transport is stopping to allow the dervied classes
a chance to close WebSocket resources.
|
void |
oneway(Object command) |
void |
sendToActiveMQ(org.apache.activemq.command.Command command) |
abstract void |
sendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command) |
void |
setBrokerService(org.apache.activemq.broker.BrokerService brokerService) |
void |
setPeerCertificates(X509Certificate[] certificates) |
void |
setTransportOptions(Map<String,Object> transportOptions) |
protected boolean |
transportStartedAtLeastOnce() |
asyncRequest, checkStarted, doConsume, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, request, setTransportListener, updateURIsaddServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonException, stopprotected ReentrantLock protocolLock
protected volatile MQTTProtocolConverter protocolConverter
protected MQTTWireFormat wireFormat
protected final MQTTInactivityMonitor mqttInactivityMonitor
protected final CountDownLatch socketTransportStarted
protected org.apache.activemq.broker.BrokerService brokerService
protected volatile int receiveCounter
protected final String remoteAddress
protected X509Certificate[] peerCertificates
public AbstractMQTTSocket(String remoteAddress)
public void oneway(Object command) throws IOException
oneway in interface org.apache.activemq.transport.TransportIOExceptionpublic void sendToActiveMQ(org.apache.activemq.command.Command command)
sendToActiveMQ in interface MQTTTransportprotected void doStop(org.apache.activemq.util.ServiceStopper stopper) throws Exception
doStop in class org.apache.activemq.util.ServiceSupportExceptionprotected void doStart() throws Exception
doStart in class org.apache.activemq.util.ServiceSupportExceptionpublic abstract void sendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command) throws IOException
sendToMQTT in interface MQTTTransportIOExceptionpublic abstract void handleStopped() throws IOException
IOException - if an error occurs during the stop.public MQTTInactivityMonitor getInactivityMonitor()
getInactivityMonitor in interface MQTTTransportpublic MQTTWireFormat getWireFormat()
getWireFormat in interface MQTTTransportgetWireFormat in interface org.apache.activemq.transport.Transportpublic String getRemoteAddress()
getRemoteAddress in interface org.apache.activemq.transport.Transportpublic int getReceiveCounter()
getReceiveCounter in interface org.apache.activemq.transport.Transportpublic X509Certificate[] getPeerCertificates()
getPeerCertificates in interface MQTTTransportgetPeerCertificates in interface org.apache.activemq.transport.Transportpublic void setPeerCertificates(X509Certificate[] certificates)
setPeerCertificates in interface MQTTTransportsetPeerCertificates in interface org.apache.activemq.transport.Transportpublic void setBrokerService(org.apache.activemq.broker.BrokerService brokerService)
setBrokerService in interface org.apache.activemq.broker.BrokerServiceAwareprotected MQTTProtocolConverter getProtocolConverter()
protected boolean transportStartedAtLeastOnce()
public void setTransportOptions(Map<String,Object> transportOptions)
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.