Interface Message
- All Known Implementing Classes:
AbstractMessage
,AcknowledgeMessage
,AcknowledgeMessageExt
,AsyncMessage
,AsyncMessageExt
,AuthenticationMessage
,CommandMessage
,CommandMessageExt
,DataMessage
,ErrorMessage
,RemotingMessage
,RPCMessage
,SequencedMessage
public interface Message
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()
Returns the body of the message.Returns the client id indicating the client that sent the message.Returns the destination that the message targets.Returns a header value corresponding to the passed header name.Returns the headers for the message.Returns the unique message id.long
Returns the timestamp for the message.long
Returns the time to live for the message.boolean
headerExists
(String name) Tests whether a header with the passed name exists.void
Sets the body of the message.void
setClientId
(String value) Sets the client id indicating the client that sent the message.void
setDestination
(String value) Sets the destination that the message targets.void
Sets a header on the message.void
setHeaders
(Map<String, Object> values) Sets the headers for the message.void
setMessageId
(String value) Sets the unique message id.void
setTimestamp
(long value) Sets the timestamp for the message.void
setTimeToLive
(long value) Sets the time to live for the message.
-
Field Details
-
NEEDS_CONFIG_HEADER
- See Also:
-
POLL_WAIT_HEADER
- See Also:
-
PRESERVE_DURABLE_HEADER
- See Also:
-
REMOVE_SUBSCRIPTIONS
- See Also:
-
SELECTOR_HEADER
- See Also:
-
SUBSCRIPTION_INVALIDATED_HEADER
- See Also:
-
SUBTOPIC_SEPARATOR
- See Also:
-
MESSAGING_VERSION
- See Also:
-
DESTINATION_CLIENT_ID_HEADER
- See Also:
-
ENDPOINT_HEADER
- See Also:
-
FLEX_CLIENT_ID_HEADER
- See Also:
-
REMOTE_CREDENTIALS_HEADER
- See Also:
-
SYNC_HEADER
- See Also:
-
-
Method Details
-
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
Returns a header value corresponding to the passed header name.- Parameters:
name
- header name- Returns:
- header value
-
getHeaders
Returns the headers for the message.- Returns:
- headers
-
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
Tests whether a header with the passed name exists.- Parameters:
name
- header name- Returns:
- true if header exists, false otherwise
-
setBody
Sets the body of the message.- Parameters:
value
- body
-
setClientId
Sets the client id indicating the client that sent the message.- Parameters:
value
- client id
-
setDestination
Sets the destination that the message targets.- Parameters:
value
- destination
-
setHeader
Sets a header on the message.- Parameters:
name
- header namevalue
- header value
-
setHeaders
Sets the headers for the message.- Parameters:
values
- header values
-
setMessageId
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
-