Class AmqpJmsMapMessageFacade
- java.lang.Object
-
- org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
-
- org.apache.qpid.jms.provider.amqp.message.AmqpJmsMapMessageFacade
-
- All Implemented Interfaces:
JmsMapMessageFacade
,JmsMessageFacade
,TraceableMessage
public class AmqpJmsMapMessageFacade extends AmqpJmsMessageFacade implements JmsMapMessageFacade
Wrapper around an AMQP Message instance that will be treated as a JMS MapMessage type.
-
-
Field Summary
-
Fields inherited from class org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
connection
-
-
Constructor Summary
Constructors Constructor Description AmqpJmsMapMessageFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JmsMapMessage
asJmsMessage()
void
clearBody()
Clears the contents of this Message.AmqpJmsMapMessageFacade
copy()
Create a new instance and perform a deep copy of this object's contents.java.lang.Object
get(java.lang.String key)
Gets the value stored in the Map at the specified key.byte
getJmsMsgType()
java.util.Enumeration<java.lang.String>
getMapNames()
Returns an Enumeration of all the names in the MapMessage object.boolean
hasBody()
Returns true if the underlying message has a body, false if the body is empty.protected void
initializeEmptyBody()
Used to indicate that a Message object should empty the body element and make any other internal updates to reflect the message now has no body value.boolean
itemExists(java.lang.String key)
Determines whether an item exists in this Map based message.void
put(java.lang.String key, java.lang.Object value)
Sets an object value with the specified name into the Map.java.lang.Object
remove(java.lang.String key)
Remove the mapping for this key from the map if present.-
Methods inherited from class org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
applicationPropertyExists, clearProperties, copyInto, encodeMessage, filterTracingAnnotations, getAmqpTimeToLiveOverride, getApplicationProperty, getApplicationPropertyNames, getContentType, getCorrelationId, getCorrelationIdBytes, getDeliveryCount, getDeliveryTime, getDestination, getExpiration, getGroupId, getGroupSequence, getMessageId, getPriority, getProperty, getPropertyNames, getProviderMessageIdObject, getRedeliveryCount, getReplyTo, getReplyToGroupId, getTimestamp, getTracingAnnotation, getTracingContext, getType, getUserId, getUserIdBytes, hasAmqpTimeToLiveOverride, initialize, initialize, isDeliveryTimeTransmitted, isPersistent, isRedelivered, onDispatch, onSend, propertyExists, removeTracingAnnotation, removeTracingContext, setAmqpTimeToLiveOverride, setApplicationProperty, setContentType, setCorrelationId, setCorrelationIdBytes, setDeliveryCount, setDeliveryTime, setDestination, setExpiration, setGroupId, setGroupSequence, setMessageId, setPersistent, setPriority, setProperty, setProviderMessageIdObject, setRedelivered, setRedeliveryCount, setReplyTo, setReplyToGroupId, setTimestamp, setTracingAnnotation, setTracingContext, setType, setUserId, setUserIdBytes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.jms.message.facade.JmsMessageFacade
clearProperties, encodeMessage, getCorrelationId, getCorrelationIdBytes, getDeliveryCount, getDeliveryTime, getDestination, getExpiration, getGroupId, getGroupSequence, getMessageId, getPriority, getProperty, getPropertyNames, getProviderMessageIdObject, getRedeliveryCount, getReplyTo, getTimestamp, getType, getUserId, getUserIdBytes, isDeliveryTimeTransmitted, isPersistent, isRedelivered, onDispatch, onSend, propertyExists, setCorrelationId, setCorrelationIdBytes, setDeliveryCount, setDeliveryTime, setDestination, setExpiration, setGroupId, setGroupSequence, setMessageId, setPersistent, setPriority, setProperty, setProviderMessageIdObject, setRedelivered, setRedeliveryCount, setReplyTo, setTimestamp, setType, setUserId, setUserIdBytes
-
Methods inherited from interface org.apache.qpid.jms.tracing.TraceableMessage
filterTracingAnnotations, getTracingAnnotation, getTracingContext, removeTracingAnnotation, removeTracingContext, setTracingAnnotation, setTracingContext
-
-
-
-
Method Detail
-
getJmsMsgType
public byte getJmsMsgType()
- Overrides:
getJmsMsgType
in classAmqpJmsMessageFacade
- Returns:
- the appropriate byte value that indicates the type of message this is.
-
copy
public AmqpJmsMapMessageFacade copy()
Description copied from interface:JmsMessageFacade
Create a new instance and perform a deep copy of this object's contents.- Specified by:
copy
in interfaceJmsMapMessageFacade
- Specified by:
copy
in interfaceJmsMessageFacade
- Overrides:
copy
in classAmqpJmsMessageFacade
- Returns:
- a copy of this JmsMessageFacade instance.
-
getMapNames
public java.util.Enumeration<java.lang.String> getMapNames()
Description copied from interface:JmsMapMessageFacade
Returns an Enumeration of all the names in the MapMessage object.- Specified by:
getMapNames
in interfaceJmsMapMessageFacade
- Returns:
- an enumeration of all the names in this MapMessage
-
itemExists
public boolean itemExists(java.lang.String key)
Description copied from interface:JmsMapMessageFacade
Determines whether an item exists in this Map based message.- Specified by:
itemExists
in interfaceJmsMapMessageFacade
- Parameters:
key
- The entry key that is being searched for.- Returns:
- true if the item exists in the Map, false otherwise.
-
get
public java.lang.Object get(java.lang.String key)
Description copied from interface:JmsMapMessageFacade
Gets the value stored in the Map at the specified key.- Specified by:
get
in interfaceJmsMapMessageFacade
- Parameters:
key
- the key to use to access a value in the Map.- Returns:
- the item associated with the given key, or null if not present.
-
put
public void put(java.lang.String key, java.lang.Object value)
Description copied from interface:JmsMapMessageFacade
Sets an object value with the specified name into the Map. If a previous mapping for the key exists, the old value is replaced by the specified value. If the value provided is a byte[] its entry then it is assumed that it was copied by the caller and its value will not be altered by the provider.- Specified by:
put
in interfaceJmsMapMessageFacade
- Parameters:
key
- the key to use to store the value into the Map.value
- the new value to store in the element defined by the key.
-
remove
public java.lang.Object remove(java.lang.String key)
Description copied from interface:JmsMapMessageFacade
Remove the mapping for this key from the map if present. If the value is not present in the map then this method should return without error or modification to the underlying map.- Specified by:
remove
in interfaceJmsMapMessageFacade
- Parameters:
key
- the key to be removed from the map if present.- Returns:
- the object previously stored in the Map or null if none present.
-
clearBody
public void clearBody()
Description copied from interface:JmsMessageFacade
Clears the contents of this Message.- Specified by:
clearBody
in interfaceJmsMessageFacade
- Overrides:
clearBody
in classAmqpJmsMessageFacade
-
hasBody
public boolean hasBody()
Description copied from interface:JmsMessageFacade
Returns true if the underlying message has a body, false if the body is empty.- Specified by:
hasBody
in interfaceJmsMessageFacade
- Overrides:
hasBody
in classAmqpJmsMessageFacade
- Returns:
- true if the underlying message has a body, false if the body is empty.
-
asJmsMessage
public JmsMapMessage asJmsMessage()
- Overrides:
asJmsMessage
in classAmqpJmsMessageFacade
-
initializeEmptyBody
protected void initializeEmptyBody()
Description copied from class:AmqpJmsMessageFacade
Used to indicate that a Message object should empty the body element and make any other internal updates to reflect the message now has no body value.- Overrides:
initializeEmptyBody
in classAmqpJmsMessageFacade
-
-