Class 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 Detail

      • socketTransportStarted

        protected final CountDownLatch socketTransportStarted
      • brokerService

        protected org.apache.activemq.broker.BrokerService brokerService
      • receiveCounter

        protected volatile int receiveCounter
      • remoteAddress

        protected final String remoteAddress
    • Constructor Detail

      • AbstractMQTTSocket

        public AbstractMQTTSocket​(String remoteAddress)
    • Method Detail

      • oneway

        public void oneway​(Object command)
                    throws IOException
        Specified by:
        oneway in interface org.apache.activemq.transport.Transport
        Throws:
        IOException
      • sendToActiveMQ

        public void sendToActiveMQ​(org.apache.activemq.command.Command command)
        Specified by:
        sendToActiveMQ in interface MQTTTransport
      • handleStopped

        public abstract void handleStopped()
                                    throws IOException
        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.
      • getRemoteAddress

        public String getRemoteAddress()
        Specified by:
        getRemoteAddress in interface org.apache.activemq.transport.Transport
      • getReceiveCounter

        public int getReceiveCounter()
        Specified by:
        getReceiveCounter in interface org.apache.activemq.transport.Transport
      • setPeerCertificates

        public void setPeerCertificates​(X509Certificate[] certificates)
        Specified by:
        setPeerCertificates in interface MQTTTransport
        Specified by:
        setPeerCertificates in interface org.apache.activemq.transport.Transport
      • setBrokerService

        public void setBrokerService​(org.apache.activemq.broker.BrokerService brokerService)
        Specified by:
        setBrokerService in interface org.apache.activemq.broker.BrokerServiceAware
      • transportStartedAtLeastOnce

        protected boolean transportStartedAtLeastOnce()
      • setTransportOptions

        public void setTransportOptions​(Map<String,​Object> transportOptions)