org.apache.activemq.transport.stomp
Class StompFrame
java.lang.Object
org.apache.activemq.transport.stomp.StompFrame
- All Implemented Interfaces:
- Command, DataStructure
- Direct Known Subclasses:
- StompFrameError
public class StompFrame
- extends java.lang.Object
- implements Command
Represents all the data in a STOMP frame.
- Author:
- chirino
|
Field Summary |
static byte[] |
NO_DATA
|
|
Constructor Summary |
StompFrame()
|
StompFrame(java.lang.String command)
|
StompFrame(java.lang.String command,
java.util.Map<java.lang.String,java.lang.String> headers)
|
StompFrame(java.lang.String command,
java.util.Map<java.lang.String,java.lang.String> headers,
byte[] data)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NO_DATA
public static final byte[] NO_DATA
StompFrame
public StompFrame(java.lang.String command)
StompFrame
public StompFrame(java.lang.String command,
java.util.Map<java.lang.String,java.lang.String> headers)
StompFrame
public StompFrame(java.lang.String command,
java.util.Map<java.lang.String,java.lang.String> headers,
byte[] data)
StompFrame
public StompFrame()
getAction
public java.lang.String getAction()
setAction
public void setAction(java.lang.String command)
getContent
public byte[] getContent()
getBody
public java.lang.String getBody()
setContent
public void setContent(byte[] data)
getHeaders
public java.util.Map<java.lang.String,java.lang.String> getHeaders()
setHeaders
public void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
getCommandId
public int getCommandId()
- Specified by:
getCommandId in interface Command
getFrom
public Endpoint getFrom()
- Specified by:
getFrom in interface Command
getTo
public Endpoint getTo()
- 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
isConnectionControl
public boolean isConnectionControl()
- Specified by:
isConnectionControl 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 java.lang.Exception
- Specified by:
visit in interface Command
- Throws:
java.lang.Exception
getDataStructureType
public byte getDataStructureType()
- Specified by:
getDataStructureType in interface DataStructure
isMarshallAware
public boolean isMarshallAware()
- Specified by:
isMarshallAware in interface DataStructure
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
format
public java.lang.String format()
format
public java.lang.String format(boolean forLogging)
getTransportContext
public java.lang.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.
setTransportContext
public void setTransportContext(java.lang.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
Copyright © 2005-2014 Red Hat, Inc.. All Rights Reserved.