Class AbstractStompSocket

java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.transport.TransportSupport
org.apache.activemq.transport.ws.AbstractStompSocket
All Implemented Interfaces:
org.apache.activemq.Service, StompTransport, org.apache.activemq.transport.Transport
Direct Known Subclasses:
StompSocket

public abstract class AbstractStompSocket extends org.apache.activemq.transport.TransportSupport implements StompTransport
Base implementation of a STOMP based WebSocket handler.
  • Field Details

  • Constructor Details

    • AbstractStompSocket

      public AbstractStompSocket(String remoteAddress)
  • Method Details

    • 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 StompTransport
    • doStop

      protected void doStop(ServiceStopper stopper) throws Exception
      Specified by:
      doStop in class ServiceSupport
      Throws:
      Exception
    • doStart

      protected void doStart() throws Exception
      Specified by:
      doStart in class ServiceSupport
      Throws:
      Exception
    • sendToStomp

      public abstract void sendToStomp(StompFrame command) throws IOException
      Specified by:
      sendToStomp in interface StompTransport
      Throws:
      IOException
    • 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.
    • getInactivityMonitor

      public StompInactivityMonitor getInactivityMonitor()
      Specified by:
      getInactivityMonitor in interface StompTransport
    • getWireFormat

      public StompWireFormat getWireFormat()
      Specified by:
      getWireFormat in interface StompTransport
      Specified by:
      getWireFormat in interface org.apache.activemq.transport.Transport
    • 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
    • processStompFrame

      protected void processStompFrame(String data)
    • getPeerCertificates

      public X509Certificate[] getPeerCertificates()
      Specified by:
      getPeerCertificates in interface org.apache.activemq.transport.Transport
    • setPeerCertificates

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