public class StompFrame extends Object implements Command
Modifier and Type | Field and Description |
---|---|
static byte[] |
NO_DATA |
Constructor and Description |
---|
StompFrame() |
StompFrame(String command) |
StompFrame(String command,
Map<String,String> headers) |
StompFrame(String command,
Map<String,String> headers,
byte[] data) |
Modifier and Type | Method and Description |
---|---|
String |
format() |
String |
format(boolean forLogging) |
String |
getAction() |
String |
getBody() |
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<String,String> |
getHeaders() |
Endpoint |
getTo()
The endpoint within the transport where this message is going to - null
means all endpoints.
|
Object |
getTransportContext()
Transports may wish to associate additional data with the connection.
|
boolean |
isBrokerInfo() |
boolean |
isConnectionControl() |
boolean |
isConsumerControl() |
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<String,String> headers) |
void |
setResponseRequired(boolean responseRequired) |
void |
setTo(Endpoint to) |
void |
setTransportContext(Object transportContext)
Transports may wish to associate additional data with the connection.
|
String |
toString() |
Response |
visit(CommandVisitor visitor) |
public static final byte[] NO_DATA
public StompFrame(String command)
public StompFrame(String command, Map<String,String> headers)
public StompFrame(String command, Map<String,String> headers, byte[] data)
public StompFrame()
public byte[] getContent()
public void setContent(byte[] data)
public Map<String,String> getHeaders()
public void setHeaders(Map<String,String> headers)
public int getCommandId()
getCommandId
in interface Command
public Endpoint getFrom()
Command
public Endpoint getTo()
Command
public boolean isBrokerInfo()
isBrokerInfo
in interface Command
public boolean isMessageAck()
isMessageAck
in interface Command
public boolean isMessageDispatch()
isMessageDispatch
in interface Command
public boolean isMessageDispatchNotification()
isMessageDispatchNotification
in interface Command
public boolean isResponse()
isResponse
in interface Command
public boolean isResponseRequired()
isResponseRequired
in interface Command
public boolean isShutdownInfo()
isShutdownInfo
in interface Command
public boolean isConnectionControl()
isConnectionControl
in interface Command
public boolean isConsumerControl()
isConsumerControl
in interface Command
public boolean isWireFormatInfo()
isWireFormatInfo
in interface Command
public void setCommandId(int value)
setCommandId
in interface Command
public void setResponseRequired(boolean responseRequired)
setResponseRequired
in interface Command
public Response visit(CommandVisitor visitor) throws Exception
public byte getDataStructureType()
getDataStructureType
in interface DataStructure
public boolean isMarshallAware()
isMarshallAware
in interface DataStructure
public Object getTransportContext()
public void setTransportContext(Object transportContext)
transportContext
- value used to set the transport contextCopyright © 2005–2020 The Apache Software Foundation. All rights reserved.