Interface Message
-
- All Known Implementing Classes:
AbstractMessage,AcknowledgeMessage,AcknowledgeMessageExt,AsyncMessage,AsyncMessageExt,AuthenticationMessage,CommandMessage,CommandMessageExt,DataMessage,ErrorMessage,RemotingMessage,RPCMessage,SequencedMessage
public interface Message
-
-
Field Summary
Fields Modifier and Type Field Description static StringDESTINATION_CLIENT_ID_HEADERstatic StringENDPOINT_HEADERstatic StringFLEX_CLIENT_ID_HEADERstatic StringMESSAGING_VERSIONstatic StringNEEDS_CONFIG_HEADERstatic StringPOLL_WAIT_HEADERstatic StringPRESERVE_DURABLE_HEADERstatic StringREMOTE_CREDENTIALS_HEADERstatic StringREMOVE_SUBSCRIPTIONSstatic StringSELECTOR_HEADERstatic StringSUBSCRIPTION_INVALIDATED_HEADERstatic StringSUBTOPIC_SEPARATORstatic StringSYNC_HEADER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetBody()Returns the body of the message.StringgetClientId()Returns the client id indicating the client that sent the message.StringgetDestination()Returns the destination that the message targets.ObjectgetHeader(String name)Returns a header value corresponding to the passed header name.Map<String,Object>getHeaders()Returns the headers for the message.StringgetMessageId()Returns the unique message id.longgetTimestamp()Returns the timestamp for the message.longgetTimeToLive()Returns the time to live for the message.booleanheaderExists(String name)Tests whether a header with the passed name exists.voidsetBody(Object value)Sets the body of the message.voidsetClientId(String value)Sets the client id indicating the client that sent the message.voidsetDestination(String value)Sets the destination that the message targets.voidsetHeader(String name, Object value)Sets a header on the message.voidsetHeaders(Map<String,Object> values)Sets the headers for the message.voidsetMessageId(String value)Sets the unique message id.voidsetTimestamp(long value)Sets the timestamp for the message.voidsetTimeToLive(long value)Sets the time to live for the message.
-
-
-
Field Detail
-
NEEDS_CONFIG_HEADER
static final String NEEDS_CONFIG_HEADER
- See Also:
- Constant Field Values
-
POLL_WAIT_HEADER
static final String POLL_WAIT_HEADER
- See Also:
- Constant Field Values
-
PRESERVE_DURABLE_HEADER
static final String PRESERVE_DURABLE_HEADER
- See Also:
- Constant Field Values
-
REMOVE_SUBSCRIPTIONS
static final String REMOVE_SUBSCRIPTIONS
- See Also:
- Constant Field Values
-
SELECTOR_HEADER
static final String SELECTOR_HEADER
- See Also:
- Constant Field Values
-
SUBSCRIPTION_INVALIDATED_HEADER
static final String SUBSCRIPTION_INVALIDATED_HEADER
- See Also:
- Constant Field Values
-
SUBTOPIC_SEPARATOR
static final String SUBTOPIC_SEPARATOR
- See Also:
- Constant Field Values
-
MESSAGING_VERSION
static final String MESSAGING_VERSION
- See Also:
- Constant Field Values
-
DESTINATION_CLIENT_ID_HEADER
static final String DESTINATION_CLIENT_ID_HEADER
- See Also:
- Constant Field Values
-
ENDPOINT_HEADER
static final String ENDPOINT_HEADER
- See Also:
- Constant Field Values
-
FLEX_CLIENT_ID_HEADER
static final String FLEX_CLIENT_ID_HEADER
- See Also:
- Constant Field Values
-
REMOTE_CREDENTIALS_HEADER
static final String REMOTE_CREDENTIALS_HEADER
- See Also:
- Constant Field Values
-
SYNC_HEADER
static final String SYNC_HEADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBody
Object getBody()
Returns the body of the message.- Returns:
- message body
-
getClientId
String getClientId()
Returns the client id indicating the client that sent the message.- Returns:
- client id
-
getDestination
String getDestination()
Returns the destination that the message targets.- Returns:
- destination
-
getHeader
Object getHeader(String name)
Returns a header value corresponding to the passed header name.- Parameters:
name- header name- Returns:
- header value
-
getMessageId
String getMessageId()
Returns the unique message id.- Returns:
- message id
-
getTimestamp
long getTimestamp()
Returns the timestamp for the message.- Returns:
- timestamp
-
getTimeToLive
long getTimeToLive()
Returns the time to live for the message.- Returns:
- time to live
-
headerExists
boolean headerExists(String name)
Tests whether a header with the passed name exists.- Parameters:
name- header name- Returns:
- true if header exists, false otherwise
-
setBody
void setBody(Object value)
Sets the body of the message.- Parameters:
value- body
-
setClientId
void setClientId(String value)
Sets the client id indicating the client that sent the message.- Parameters:
value- client id
-
setDestination
void setDestination(String value)
Sets the destination that the message targets.- Parameters:
value- destination
-
setHeader
void setHeader(String name, Object value)
Sets a header on the message.- Parameters:
name- header namevalue- header value
-
setHeaders
void setHeaders(Map<String,Object> values)
Sets the headers for the message.- Parameters:
values- header values
-
setMessageId
void setMessageId(String value)
Sets the unique message id.- Parameters:
value- message id
-
setTimestamp
void setTimestamp(long value)
Sets the timestamp for the message.- Parameters:
value- timestamp
-
setTimeToLive
void setTimeToLive(long value)
Sets the time to live for the message.- Parameters:
value- ttl
-
-