Class MQTTConnection
- java.lang.Object
-
- org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnection
-
- All Implemented Interfaces:
org.apache.activemq.artemis.spi.core.protocol.RemotingConnection,org.apache.activemq.artemis.spi.core.remoting.BufferHandler
public class MQTTConnection extends java.lang.Object implements org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
-
Constructor Summary
Constructors Constructor Description MQTTConnection(org.apache.activemq.artemis.spi.core.remoting.Connection transportConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCloseListener(org.apache.activemq.artemis.core.remoting.CloseListener listener)voidaddFailureListener(org.apache.activemq.artemis.core.remoting.FailureListener listener)java.util.concurrent.FutureasyncFail(org.apache.activemq.artemis.api.core.ActiveMQException me)voidbufferReceived(java.lang.Object connectionID, org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)booleancheckDataReceived()org.apache.activemq.artemis.api.core.ActiveMQBuffercreateTransportBuffer(int size)protected voiddataReceived()voiddestroy()voiddisconnect(boolean criticalError)voiddisconnect(java.lang.String scaleDownNodeID, boolean criticalError)voidfail(org.apache.activemq.artemis.api.core.ActiveMQException me)voidfail(org.apache.activemq.artemis.api.core.ActiveMQException me, java.lang.String scaleDownTargetNodeID)voidflush()javax.security.auth.SubjectgetAuditSubject()java.lang.StringgetClientID()Returns the Client ID associated with this connectionbooleangetConnected()longgetCreationTime()java.util.List<org.apache.activemq.artemis.core.remoting.FailureListener>getFailureListeners()java.lang.ObjectgetID()java.lang.StringgetProtocolName()Returns the name of the protocol for this Remoting Connectionjava.lang.StringgetRemoteAddress()javax.security.auth.SubjectgetSubject()org.apache.activemq.artemis.spi.core.remoting.ConnectiongetTransportConnection()java.lang.StringgetTransportLocalAddress()booleanisClient()booleanisDestroyed()booleanisSupportReconnect()booleanisSupportsFlowControl()booleanisWritable(org.apache.activemq.artemis.spi.core.remoting.ReadyListener callback)voidkillMessage(org.apache.activemq.artemis.api.core.SimpleString nodeID)booleanremoveCloseListener(org.apache.activemq.artemis.core.remoting.CloseListener listener)java.util.List<org.apache.activemq.artemis.core.remoting.CloseListener>removeCloseListeners()booleanremoveFailureListener(org.apache.activemq.artemis.core.remoting.FailureListener listener)java.util.List<org.apache.activemq.artemis.core.remoting.FailureListener>removeFailureListeners()voidscheduledFlush()voidsetAuditSubject(javax.security.auth.Subject subject)voidsetClientID(java.lang.String cID)Sets the client ID associated with this connectionvoidsetCloseListeners(java.util.List<org.apache.activemq.artemis.core.remoting.CloseListener> listeners)voidsetConnected(boolean connected)voidsetFailureListeners(java.util.List<org.apache.activemq.artemis.core.remoting.FailureListener> listeners)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
scheduledFlush
public void scheduledFlush()
- Specified by:
scheduledFlushin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
isWritable
public boolean isWritable(org.apache.activemq.artemis.spi.core.remoting.ReadyListener callback)
- Specified by:
isWritablein interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getID
public java.lang.Object getID()
- Specified by:
getIDin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTimein interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getRemoteAddress
public java.lang.String getRemoteAddress()
- Specified by:
getRemoteAddressin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
addFailureListener
public void addFailureListener(org.apache.activemq.artemis.core.remoting.FailureListener listener)
- Specified by:
addFailureListenerin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
removeFailureListener
public boolean removeFailureListener(org.apache.activemq.artemis.core.remoting.FailureListener listener)
- Specified by:
removeFailureListenerin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
addCloseListener
public void addCloseListener(org.apache.activemq.artemis.core.remoting.CloseListener listener)
- Specified by:
addCloseListenerin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
removeCloseListener
public boolean removeCloseListener(org.apache.activemq.artemis.core.remoting.CloseListener listener)
- Specified by:
removeCloseListenerin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
removeCloseListeners
public java.util.List<org.apache.activemq.artemis.core.remoting.CloseListener> removeCloseListeners()
- Specified by:
removeCloseListenersin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
setCloseListeners
public void setCloseListeners(java.util.List<org.apache.activemq.artemis.core.remoting.CloseListener> listeners)
- Specified by:
setCloseListenersin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getFailureListeners
public java.util.List<org.apache.activemq.artemis.core.remoting.FailureListener> getFailureListeners()
- Specified by:
getFailureListenersin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
removeFailureListeners
public java.util.List<org.apache.activemq.artemis.core.remoting.FailureListener> removeFailureListeners()
- Specified by:
removeFailureListenersin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
setFailureListeners
public void setFailureListeners(java.util.List<org.apache.activemq.artemis.core.remoting.FailureListener> listeners)
- Specified by:
setFailureListenersin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
createTransportBuffer
public org.apache.activemq.artemis.api.core.ActiveMQBuffer createTransportBuffer(int size)
- Specified by:
createTransportBufferin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
fail
public void fail(org.apache.activemq.artemis.api.core.ActiveMQException me)
- Specified by:
failin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
fail
public void fail(org.apache.activemq.artemis.api.core.ActiveMQException me, java.lang.String scaleDownTargetNodeID)- Specified by:
failin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
asyncFail
public java.util.concurrent.Future asyncFail(org.apache.activemq.artemis.api.core.ActiveMQException me)
- Specified by:
asyncFailin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getTransportConnection
public org.apache.activemq.artemis.spi.core.remoting.Connection getTransportConnection()
- Specified by:
getTransportConnectionin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
isClient
public boolean isClient()
- Specified by:
isClientin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
disconnect
public void disconnect(boolean criticalError)
- Specified by:
disconnectin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
disconnect
public void disconnect(java.lang.String scaleDownNodeID, boolean criticalError)- Specified by:
disconnectin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
dataReceived
protected void dataReceived()
-
checkDataReceived
public boolean checkDataReceived()
- Specified by:
checkDataReceivedin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
flush
public void flush()
- Specified by:
flushin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
bufferReceived
public void bufferReceived(java.lang.Object connectionID, org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)- Specified by:
bufferReceivedin interfaceorg.apache.activemq.artemis.spi.core.remoting.BufferHandler
-
setConnected
public void setConnected(boolean connected)
-
getConnected
public boolean getConnected()
-
killMessage
public void killMessage(org.apache.activemq.artemis.api.core.SimpleString nodeID)
- Specified by:
killMessagein interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
isSupportReconnect
public boolean isSupportReconnect()
- Specified by:
isSupportReconnectin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
isSupportsFlowControl
public boolean isSupportsFlowControl()
- Specified by:
isSupportsFlowControlin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
setAuditSubject
public void setAuditSubject(javax.security.auth.Subject subject)
- Specified by:
setAuditSubjectin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getAuditSubject
public javax.security.auth.Subject getAuditSubject()
- Specified by:
getAuditSubjectin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getSubject
public javax.security.auth.Subject getSubject()
- Specified by:
getSubjectin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getProtocolName
public java.lang.String getProtocolName()
Returns the name of the protocol for this Remoting Connection- Specified by:
getProtocolNamein interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection- Returns:
-
setClientID
public void setClientID(java.lang.String cID)
Sets the client ID associated with this connection- Specified by:
setClientIDin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection- Parameters:
cID-
-
getClientID
public java.lang.String getClientID()
Returns the Client ID associated with this connection- Specified by:
getClientIDin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection- Returns:
-
getTransportLocalAddress
public java.lang.String getTransportLocalAddress()
- Specified by:
getTransportLocalAddressin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
-