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
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
-
Field Summary
Fields inherited from class org.apache.activemq.transport.TransportFilter
next, transportListener -
Constructor Summary
ConstructorsConstructorDescriptionStompTransportFilter(Transport next, org.apache.activemq.wireformat.WireFormat wireFormat, BrokerContext brokerContext) -
Method Summary
Modifier and TypeMethodDescriptionlongfloatReturns the currently configured Read check grace period multiplier.intlongbooleanisTrace()voidvoidvoidsendToActiveMQ(org.apache.activemq.command.Command command) voidsendToStomp(StompFrame command) voidsetConnectAttemptTimeout(long timeout) voidsetDefaultHeartBeat(String defaultHeartBeat) voidsetHbGracePeriodMultiplier(float hbGracePeriodMultiplier) Sets the read check grace period multiplier.voidvoidsetMaxDataLength(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.voidsetMaxFrameSize(int maxFrameSize) voidsetTrace(boolean trace) voidstart()Methods inherited from class org.apache.activemq.transport.TransportFilter
asyncRequest, getNext, getPeerCertificates, getReceiveCounter, getRemoteAddress, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, request, setPeerCertificates, setTransportListener, stop, toString, transportInterupted, transportResumed, updateURIsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.activemq.transport.stomp.StompTransport
onException
-
Constructor Details
-
StompTransportFilter
public StompTransportFilter(Transport next, org.apache.activemq.wireformat.WireFormat wireFormat, BrokerContext brokerContext)
-
-
Method Details
-
start
- Specified by:
startin interfaceorg.apache.activemq.Service- Overrides:
startin classTransportFilter- Throws:
Exception
-
oneway
- Specified by:
onewayin interfaceTransport- Overrides:
onewayin classTransportFilter- Throws:
IOException
-
onCommand
- Specified by:
onCommandin interfaceTransportListener- Overrides:
onCommandin classTransportFilter
-
sendToActiveMQ
public void sendToActiveMQ(org.apache.activemq.command.Command command) - Specified by:
sendToActiveMQin interfaceStompTransport
-
sendToStomp
- Specified by:
sendToStompin interfaceStompTransport- Throws:
IOException
-
isTrace
public boolean isTrace() -
setTrace
public void setTrace(boolean trace) -
getInactivityMonitor
- Specified by:
getInactivityMonitorin interfaceStompTransport
-
setInactivityMonitor
-
getWireFormat
- Specified by:
getWireFormatin interfaceStompTransport- Specified by:
getWireFormatin interfaceTransport- Overrides:
getWireFormatin classTransportFilter
-
getDefaultHeartBeat
-
setDefaultHeartBeat
-
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)
-