org.apache.activemq.transport.stomp
Class StompFrame

java.lang.Object
  extended by 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

Constructor Summary
StompFrame()
           
StompFrame(String command, HashMap headers, byte[] data)
           
 
Method Summary
 String getAction()
           
 int getCommandId()
           
 byte[] getContent()
           
 byte getDataStructureType()
           
 Endpoint getFrom()
          The endpoint within the transport where this message came from which could be null if the transport only supports a single endpoint.
 Map getHeaders()
           
 Endpoint getTo()
          The endpoint within the transport where this message is going to - null means all endpoints.
 boolean isBrokerInfo()
           
 boolean isMarshallAware()
           
 boolean isMessage()
           
 boolean isMessageAck()
           
 boolean isMessageDispatch()
           
 boolean isMessageDispatchNotification()
           
 boolean isResponse()
           
 boolean isResponseRequired()
           
 boolean isShutdownInfo()
           
 boolean isWireFormatInfo()
           
 void setAction(String command)
           
 void setCommandId(int value)
           
 void setContent(byte[] data)
           
 void setFrom(Endpoint from)
           
 void setHeaders(Map headers)
           
 void setResponseRequired(boolean responseRequired)
           
 void setTo(Endpoint to)
           
 String toString()
           
 Response visit(CommandVisitor visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StompFrame

public StompFrame(String command,
                  HashMap headers,
                  byte[] data)

StompFrame

public StompFrame()
Method Detail

getAction

public String getAction()

setAction

public void setAction(String command)

getContent

public byte[] getContent()

setContent

public void setContent(byte[] data)

getHeaders

public Map getHeaders()

setHeaders

public void setHeaders(Map headers)

getCommandId

public int getCommandId()
Specified by:
getCommandId in interface Command
Returns:
the unique ID of this request used to map responses to requests

getFrom

public Endpoint getFrom()
Description copied from interface: Command
The endpoint within the transport where this message came from which could be null if the transport only supports a single endpoint.

Specified by:
getFrom in interface Command

getTo

public Endpoint getTo()
Description copied from interface: Command
The endpoint within the transport where this message is going to - null means all endpoints.

Specified by:
getTo in interface Command

isBrokerInfo

public boolean isBrokerInfo()
Specified by:
isBrokerInfo in interface Command

isMessage

public boolean isMessage()
Specified by:
isMessage in interface Command

isMessageAck

public boolean isMessageAck()
Specified by:
isMessageAck in interface Command

isMessageDispatch

public boolean isMessageDispatch()
Specified by:
isMessageDispatch in interface Command

isMessageDispatchNotification

public boolean isMessageDispatchNotification()
Specified by:
isMessageDispatchNotification in interface Command

isResponse

public boolean isResponse()
Specified by:
isResponse in interface Command

isResponseRequired

public boolean isResponseRequired()
Specified by:
isResponseRequired in interface Command

isShutdownInfo

public boolean isShutdownInfo()
Specified by:
isShutdownInfo in interface Command

isWireFormatInfo

public boolean isWireFormatInfo()
Specified by:
isWireFormatInfo in interface Command

setCommandId

public void setCommandId(int value)
Specified by:
setCommandId in interface Command

setFrom

public void setFrom(Endpoint from)
Specified by:
setFrom in interface Command

setResponseRequired

public void setResponseRequired(boolean responseRequired)
Specified by:
setResponseRequired in interface Command

setTo

public void setTo(Endpoint to)
Specified by:
setTo in interface Command

visit

public Response visit(CommandVisitor visitor)
               throws Exception
Specified by:
visit in interface Command
Throws:
Exception

getDataStructureType

public byte getDataStructureType()
Specified by:
getDataStructureType in interface DataStructure
Returns:
The type of the data structure

isMarshallAware

public boolean isMarshallAware()
Specified by:
isMarshallAware in interface DataStructure

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 Apache Software Foundation. All Rights Reserved.