public interface JmsMessageFacade extends TraceableMessage
| Modifier and Type | Method and Description |
|---|---|
void |
clearBody()
Clears the contents of this Message.
|
void |
clearProperties()
Clears any Message properties that exist for this Message instance.
|
JmsMessageFacade |
copy()
Create a new instance and perform a deep copy of this object's
contents.
|
Object |
encodeMessage()
Encodes the protocol level Message instance for transmission.
|
String |
getCorrelationId()
Returns the correlation ID set on this message if one exists, null otherwise.
|
byte[] |
getCorrelationIdBytes()
Gets the set correlation ID of the message in raw bytes form.
|
int |
getDeliveryCount()
Returns the current delivery count of the Message as set in the underlying
message instance.
|
long |
getDeliveryTime()
Returns the set delivery time for this message.
|
JmsDestination |
getDestination()
Gets the Destination value that was assigned to this message at the time it was
sent.
|
long |
getExpiration()
Returns the set expiration time for this message.
|
String |
getGroupId()
Gets the Group ID that this message is assigned to.
|
int |
getGroupSequence()
Gets the assigned group sequence of this message.
|
String |
getMessageId()
Returns the message ID set on this message if one exists, null otherwise.
|
int |
getPriority()
Returns the assigned priority value of this message in JMS ranged scoping.
|
Object |
getProperty(String key)
Returns the property stored in the message accessed via the given key/
|
Set<String> |
getPropertyNames()
Returns the property names for this Message instance.
|
Object |
getProviderMessageIdObject()
Returns the underlying providers message ID object for this message if one
exists, null otherwise.
|
int |
getRedeliveryCount()
Returns the current redelivery count of the Message as set in the underlying
message instance.
|
JmsDestination |
getReplyTo()
Gets the Destination where replies for this Message are to be sent to.
|
long |
getTimestamp()
Gets the time stamp assigned to the message when it was sent.
|
String |
getType()
Returns the JMSType value as defined by the provider or set by the sending client.
|
String |
getUserId()
Returns the ID of the user that sent this message if available.
|
byte[] |
getUserIdBytes()
Gets the set user ID of the message in raw bytes form.
|
boolean |
hasBody()
Returns true if the underlying message has a body, false if the body is empty.
|
boolean |
isDeliveryTimeTransmitted()
Returns whether the delivery time is being transmitted, i.e.
|
boolean |
isPersistent() |
boolean |
isRedelivered()
Used to quickly check if a message has been redelivered.
|
void |
onDispatch()
Called before a message is dispatched to its intended consumer to allow for
any necessary processing of message data such as setting read-only state etc.
|
void |
onSend(long producerTtl)
Called before a message is sent to allow a Message instance to move the
contents from a logical data structure to a binary form for transmission, or
other processing such as setting proper message headers etc.
|
boolean |
propertyExists(String key) |
void |
setCorrelationId(String correlationId)
Sets the correlation ID for this message.
|
void |
setCorrelationIdBytes(byte[] correlationId)
Sets the correlation ID of the message in raw byte form.
|
void |
setDeliveryCount(int deliveryCount)
Sets the delivery count on the message.
|
void |
setDeliveryTime(long deliveryTime,
boolean transmit)
Sets an desired delivery time on this message.
|
void |
setDestination(JmsDestination destination)
Sets the Destination that this message is being sent to.
|
void |
setExpiration(long expiration)
Sets an expiration time on this message.
|
void |
setGroupId(String groupId)
Sets the Group ID to use for this message.
|
void |
setGroupSequence(int groupSequence)
Sets the group sequence value for this message.
|
void |
setMessageId(String messageId)
Sets the message ID for this message.
|
void |
setPersistent(boolean value)
Sets the persistent flag on this message.
|
void |
setPriority(int priority)
Sets the message priority for this message using a JMS priority scoped value.
|
void |
setProperty(String key,
Object value)
Sets the message property value using the supplied key to identify the value
that should be set or updated.
|
void |
setProviderMessageIdObject(Object messageId)
Sets the underlying providers message ID object for this message, or
clears it if the provided value is null.
|
void |
setRedelivered(boolean redelivered)
Used to set the redelivered state of a message.
|
void |
setRedeliveryCount(int redeliveryCount)
Used to update the message redelivery after a local redelivery of the Message
has been performed.
|
void |
setReplyTo(JmsDestination replyTo)
Sets the Destination where replies to this Message are to be sent.
|
void |
setTimestamp(long timestamp)
Sets the time stamp value of this message.
|
void |
setType(String type)
Sets the String value used to define the Message JMSType by the client.
|
void |
setUserId(String userId)
Sets the User ID for the connection that is being used to send this message.
|
void |
setUserIdBytes(byte[] userId)
Sets the user ID of the message in raw byte form.
|
filterTracingAnnotations, getTracingAnnotation, getTracingContext, removeTracingAnnotation, removeTracingContext, setTracingAnnotation, setTracingContextSet<String> getPropertyNames() throws javax.jms.JMSException
javax.jms.JMSException - if an error occurs while accessing the Message properties.boolean propertyExists(String key) throws javax.jms.JMSException
key - The property name that is being searched for.javax.jms.JMSException - if an error occurs while accessing the Message properties.Object getProperty(String key) throws javax.jms.JMSException
key - the key used to access the given property.javax.jms.JMSException - if an error occurs while accessing the Message properties.void setProperty(String key, Object value) throws javax.jms.JMSException
key - the key that identifies the message property.value - the value that is to be stored in the message.javax.jms.JMSException - if an error occurs while accessing the Message properties.void onSend(long producerTtl)
throws javax.jms.JMSException
producerTtl - the time to live value configured on the producer when sent.javax.jms.JMSException - if an error occurs while preparing the message for send.void onDispatch()
throws javax.jms.JMSException
javax.jms.JMSException - if an error occurs while preparing the message for dispatch.void clearBody()
void clearProperties()
throws javax.jms.JMSException
javax.jms.JMSException - if an error occurs while accessing the message properties.JmsMessageFacade copy() throws javax.jms.JMSException
javax.jms.JMSException - if an error occurs while copying the message.long getTimestamp()
void setTimestamp(long timestamp)
timestamp - the time that the message was sent by the provider.String getCorrelationId()
void setCorrelationId(String correlationId) throws javax.jms.JMSException
correlationId - The correlation ID to set on this message, or null to clear.javax.jms.JMSException - if an error occurs while setting the correlation ID.byte[] getCorrelationIdBytes()
throws javax.jms.JMSException
javax.jms.JMSException - if an error occurs while accessing the property.void setCorrelationIdBytes(byte[] correlationId)
correlationId - the byte array to use to set the message correlation ID.String getMessageId()
void setMessageId(String messageId) throws javax.jms.JMSException
messageId - The message ID to set on this message, or null to clear.javax.jms.JMSException - if an error occurs while setting the message ID.boolean isPersistent()
void setPersistent(boolean value)
value - true if the message is to be marked as persistent.int getDeliveryCount()
void setDeliveryCount(int deliveryCount)
deliveryCount - the new delivery count to assign the Message.int getRedeliveryCount()
void setRedeliveryCount(int redeliveryCount)
redeliveryCount - the new redelivery count to assign the Message.boolean isRedelivered()
void setRedelivered(boolean redelivered)
redelivered - true if the message is to be marked as redelivered, false otherwise.String getType()
void setType(String type)
type - the JMSType value the client assigns to this message.int getPriority()
void setPriority(int priority)
priority - the new priority value to set on this message.long getExpiration()
void setExpiration(long expiration)
expiration - the time that this message should be considered as expired.long getDeliveryTime()
void setDeliveryTime(long deliveryTime,
boolean transmit)
deliveryTime - the earliest time that the message should be made available for delivery.transmit - whether to transmit an annotation containing the value (if non-zero)JmsDestination getDestination()
void setDestination(JmsDestination destination)
destination - the destination that this message is being sent to.JmsDestination getReplyTo()
void setReplyTo(JmsDestination replyTo)
replyTo - the Destination where replies should be sent, or null to clear.String getUserId()
void setUserId(String userId)
userId - the user ID that sent this message or null to clear.byte[] getUserIdBytes()
throws javax.jms.JMSException
javax.jms.JMSException - if an error occurs while accessing the property.void setUserIdBytes(byte[] userId)
userId - the byte array to use to set the message user ID.String getGroupId()
void setGroupId(String groupId)
groupId - the Group ID that this message is assigned to.int getGroupSequence()
void setGroupSequence(int groupSequence)
groupSequence - the group sequence value to assign this message.Object getProviderMessageIdObject()
void setProviderMessageIdObject(Object messageId)
messageId - The message ID to set on this message, or null to clear.boolean hasBody()
Object encodeMessage()
boolean isDeliveryTimeTransmitted()
Copyright © 2013–2019 The Apache Software Foundation. All rights reserved.