Class VersionedStompFrameHandler
java.lang.Object
org.apache.activemq.artemis.core.protocol.stomp.VersionedStompFrameHandler
- Direct Known Subclasses:
StompFrameHandlerV10,StompFrameHandlerV11
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StompConnectionprotected StompDecoderprotected static byte[]protected final ExecutorFactoryprotected final ScheduledExecutorService -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVersionedStompFrameHandler(StompConnection connection, ScheduledExecutorService scheduledExecutorService, ExecutorFactory executorFactory) -
Method Summary
Modifier and TypeMethodDescriptioncreateMessageFrame(ICoreMessage serverMessage, StompSubscription subscription, org.apache.activemq.artemis.core.server.ServerConsumer consumer, int deliveryCount) abstract StompFramecreateStompFrame(String command) decode(ActiveMQBuffer buffer) protected voidgetDestination(StompFrame request) getDestination(StompFrame request, String header) protected StompFramestatic VersionedStompFrameHandlergetHandler(StompConnection connection, StompVersions version, ScheduledExecutorService scheduledExecutorService, ExecutorFactory executorFactory) getPrefix(StompFrame request) handleFrame(StompFrame request) handleReceipt(String receiptID) booleanhasBytes()voidinitDecoder(VersionedStompFrameHandler existingHandler) this method is called when a newer version of handler is created.onAbort(StompFrame request) abstract StompFrameonAck(StompFrame request) onBegin(StompFrame frame) onCommit(StompFrame request) abstract StompFrameonConnect(StompFrame frame) abstract StompFrameonDisconnect(StompFrame frame) voidabstract StompFrameonNack(StompFrame request) onSend(StompFrame frame) abstract StompFrameonStomp(StompFrame request) onSubscribe(StompFrame frame) abstract StompFrameonUnsubscribe(StompFrame request) postprocess(StompFrame request)
-
Field Details
-
EMPTY_BODY
protected static byte[] EMPTY_BODY -
connection
-
decoder
-
scheduledExecutorService
-
executorFactory
-
-
Constructor Details
-
VersionedStompFrameHandler
protected VersionedStompFrameHandler(StompConnection connection, ScheduledExecutorService scheduledExecutorService, ExecutorFactory executorFactory)
-
-
Method Details
-
disconnect
protected void disconnect() -
getHandler
public static VersionedStompFrameHandler getHandler(StompConnection connection, StompVersions version, ScheduledExecutorService scheduledExecutorService, ExecutorFactory executorFactory) -
decode
- Throws:
ActiveMQStompException
-
hasBytes
public boolean hasBytes() -
getDecoder
-
handleFrame
-
onConnect
-
onDisconnect
-
onAck
-
onUnsubscribe
-
onStomp
-
onNack
-
createStompFrame
-
onUnknown
-
handleReceipt
-
onCommit
-
onSend
-
onBegin
-
onAbort
-
onSubscribe
- Throws:
Exception
-
getDestination
- Throws:
Exception
-
getDestination
- Throws:
Exception
-
getPrefix
- Throws:
Exception
-
postprocess
-
createMessageFrame
public StompFrame createMessageFrame(ICoreMessage serverMessage, StompSubscription subscription, org.apache.activemq.artemis.core.server.ServerConsumer consumer, int deliveryCount) throws ActiveMQException - Throws:
ActiveMQException
-
initDecoder
this method is called when a newer version of handler is created. It should take over the state of the decoder of the existingHandler so that the decoding can be continued. For V10 handler it's never called. -
onError
-
getFailedAuthenticationResponse
-