Class StompTransportFilter

java.lang.Object
org.apache.activemq.transport.TransportFilter
org.apache.activemq.transport.stomp.StompTransportFilter
All Implemented Interfaces:
org.apache.activemq.Service, StompTransport, Transport, TransportListener

public class StompTransportFilter extends TransportFilter implements StompTransport
The StompTransportFilter normally sits on top of a TcpTransport that has been configured with the StompWireFormat and is used to convert STOMP commands to ActiveMQ commands. All of the conversion work is done by delegating to the ProtocolConverter.
Author:
chirino
  • Constructor Details

    • StompTransportFilter

      public StompTransportFilter(Transport next, org.apache.activemq.wireformat.WireFormat wireFormat, BrokerContext brokerContext)
  • Method Details

    • start

      public void start() throws Exception
      Specified by:
      start in interface org.apache.activemq.Service
      Overrides:
      start in class TransportFilter
      Throws:
      Exception
    • oneway

      public void oneway(Object o) throws IOException
      Specified by:
      oneway in interface Transport
      Overrides:
      oneway in class TransportFilter
      Throws:
      IOException
    • onCommand

      public void onCommand(Object command)
      Specified by:
      onCommand in interface TransportListener
      Overrides:
      onCommand in class TransportFilter
    • sendToActiveMQ

      public void sendToActiveMQ(org.apache.activemq.command.Command command)
      Specified by:
      sendToActiveMQ in interface StompTransport
    • sendToStomp

      public void sendToStomp(StompFrame command) throws IOException
      Specified by:
      sendToStomp in interface StompTransport
      Throws:
      IOException
    • isTrace

      public boolean isTrace()
    • setTrace

      public void setTrace(boolean trace)
    • getInactivityMonitor

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

      public void setInactivityMonitor(StompInactivityMonitor monitor)
    • getWireFormat

      public StompWireFormat getWireFormat()
      Specified by:
      getWireFormat in interface StompTransport
      Specified by:
      getWireFormat in interface Transport
      Overrides:
      getWireFormat in class TransportFilter
    • getDefaultHeartBeat

      public String getDefaultHeartBeat()
    • setDefaultHeartBeat

      public void setDefaultHeartBeat(String defaultHeartBeat)
    • getHbGracePeriodMultiplier

      public float getHbGracePeriodMultiplier()
      Returns the currently configured Read check grace period multiplier.
      Returns:
      the hbGracePeriodMultiplier
    • setHbGracePeriodMultiplier

      public void setHbGracePeriodMultiplier(float hbGracePeriodMultiplier)
      Sets the read check grace period multiplier. New CONNECT frames that indicate a heart beat value with a read check interval will have that value multiplied by this value to add a grace period before the connection is considered invalid. By default this value is set to zero and no grace period is given. When set the value must be larger than 1.0 or it will be ignored.
      Parameters:
      hbGracePeriodMultiplier - the hbGracePeriodMultiplier to set
    • setMaxDataLength

      public void setMaxDataLength(int maxDataLength)
      Sets the maximum number of bytes that the data portion of a STOMP frame is allowed to be, any incoming STOMP frame with a data section larger than this value will receive an error response.
      Parameters:
      maxDataLength - size in bytes of the maximum data portion of a STOMP frame.
    • getMaxDataLength

      public int getMaxDataLength()
    • setMaxFrameSize

      public void setMaxFrameSize(int maxFrameSize)
    • getMaxFrameSize

      public long getMaxFrameSize()
    • getConnectAttemptTimeout

      public long getConnectAttemptTimeout()
    • setConnectAttemptTimeout

      public void setConnectAttemptTimeout(long timeout)