Class StompFrame
- java.lang.Object
- 
- org.apache.activemq.transport.stomp.StompFrame
 
- 
- All Implemented Interfaces:
- Command,- DataStructure
 - Direct Known Subclasses:
- StompFrameError
 
 public class StompFrame extends Object implements Command Represents all the data in a STOMP frame.- Author:
- chirino
 
- 
- 
Field SummaryFields Modifier and Type Field Description static byte[]NO_DATA
 - 
Constructor SummaryConstructors Constructor Description StompFrame()StompFrame(String command)StompFrame(String command, Map<String,String> headers)StompFrame(String command, Map<String,String> headers, byte[] data)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat()Stringformat(boolean forLogging)StringgetAction()StringgetBody()intgetCommandId()byte[]getContent()bytegetDataStructureType()EndpointgetFrom()The endpoint within the transport where this message came from which could be null if the transport only supports a single endpoint.Map<String,String>getHeaders()EndpointgetTo()The endpoint within the transport where this message is going to - null means all endpoints.ObjectgetTransportContext()Transports may wish to associate additional data with the connection.booleanisBrokerInfo()booleanisConnectionControl()booleanisConsumerControl()booleanisMarshallAware()booleanisMessage()booleanisMessageAck()booleanisMessageDispatch()booleanisMessageDispatchNotification()booleanisResponse()booleanisResponseRequired()booleanisShutdownInfo()booleanisWireFormatInfo()voidsetAction(String command)voidsetCommandId(int value)voidsetContent(byte[] data)voidsetFrom(Endpoint from)voidsetHeaders(Map<String,String> headers)voidsetResponseRequired(boolean responseRequired)voidsetTo(Endpoint to)voidsetTransportContext(Object transportContext)Transports may wish to associate additional data with the connection.StringtoString()Responsevisit(CommandVisitor visitor)
 
- 
- 
- 
Method Detail- 
getActionpublic String getAction() 
 - 
setActionpublic void setAction(String command) 
 - 
getContentpublic byte[] getContent() 
 - 
getBodypublic String getBody() 
 - 
setContentpublic void setContent(byte[] data) 
 - 
getCommandIdpublic int getCommandId() - Specified by:
- getCommandIdin interface- Command
- Returns:
- the unique ID of this request used to map responses to requests
 
 - 
getFrompublic Endpoint getFrom() Description copied from interface:CommandThe endpoint within the transport where this message came from which could be null if the transport only supports a single endpoint.
 - 
getTopublic Endpoint getTo() Description copied from interface:CommandThe endpoint within the transport where this message is going to - null means all endpoints.
 - 
isBrokerInfopublic boolean isBrokerInfo() - Specified by:
- isBrokerInfoin interface- Command
 
 - 
isMessageAckpublic boolean isMessageAck() - Specified by:
- isMessageAckin interface- Command
 
 - 
isMessageDispatchpublic boolean isMessageDispatch() - Specified by:
- isMessageDispatchin interface- Command
 
 - 
isMessageDispatchNotificationpublic boolean isMessageDispatchNotification() - Specified by:
- isMessageDispatchNotificationin interface- Command
 
 - 
isResponsepublic boolean isResponse() - Specified by:
- isResponsein interface- Command
 
 - 
isResponseRequiredpublic boolean isResponseRequired() - Specified by:
- isResponseRequiredin interface- Command
 
 - 
isShutdownInfopublic boolean isShutdownInfo() - Specified by:
- isShutdownInfoin interface- Command
 
 - 
isConnectionControlpublic boolean isConnectionControl() - Specified by:
- isConnectionControlin interface- Command
 
 - 
isConsumerControlpublic boolean isConsumerControl() - Specified by:
- isConsumerControlin interface- Command
 
 - 
isWireFormatInfopublic boolean isWireFormatInfo() - Specified by:
- isWireFormatInfoin interface- Command
 
 - 
setCommandIdpublic void setCommandId(int value) - Specified by:
- setCommandIdin interface- Command
 
 - 
setResponseRequiredpublic void setResponseRequired(boolean responseRequired) - Specified by:
- setResponseRequiredin interface- Command
 
 - 
visitpublic Response visit(CommandVisitor visitor) throws Exception 
 - 
getDataStructureTypepublic byte getDataStructureType() - Specified by:
- getDataStructureTypein interface- DataStructure
- Returns:
- The type of the data structure
 
 - 
isMarshallAwarepublic boolean isMarshallAware() - Specified by:
- isMarshallAwarein interface- DataStructure
 
 - 
formatpublic String format() 
 - 
formatpublic String format(boolean forLogging) 
 - 
getTransportContextpublic Object getTransportContext() Transports may wish to associate additional data with the connection. For example, an SSL transport may use this field to attach the client certificates used when the connection was established.- Returns:
- the transport context.
 
 - 
setTransportContextpublic void setTransportContext(Object transportContext) Transports may wish to associate additional data with the connection. For example, an SSL transport may use this field to attach the client certificates used when the connection was established.- Parameters:
- transportContext- value used to set the transport context
 
 
- 
 
-