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 JmsMapMessageasJmsMessage()voidclearBody()Clears the contents of this Message.AmqpJmsMapMessageFacadecopy()Create a new instance and perform a deep copy of this object's contents.Objectget(String key)Gets the value stored in the Map at the specified key.bytegetJmsMsgType()Enumeration<String>getMapNames()Returns an Enumeration of all the names in the MapMessage object.booleanhasBody()Returns true if the underlying message has a body, false if the body is empty.protected voidinitializeEmptyBody()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.booleanitemExists(String key)Determines whether an item exists in this Map based message.voidput(String key, Object value)Sets an object value with the specified name into the Map.Objectremove(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:
getJmsMsgTypein classAmqpJmsMessageFacade- Returns:
- the appropriate byte value that indicates the type of message this is.
-
copy
public AmqpJmsMapMessageFacade copy()
Description copied from interface:JmsMessageFacadeCreate a new instance and perform a deep copy of this object's contents.- Specified by:
copyin interfaceJmsMapMessageFacade- Specified by:
copyin interfaceJmsMessageFacade- Overrides:
copyin classAmqpJmsMessageFacade- Returns:
- a copy of this JmsMessageFacade instance.
-
getMapNames
public Enumeration<String> getMapNames()
Description copied from interface:JmsMapMessageFacadeReturns an Enumeration of all the names in the MapMessage object.- Specified by:
getMapNamesin interfaceJmsMapMessageFacade- Returns:
- an enumeration of all the names in this MapMessage
-
itemExists
public boolean itemExists(String key)
Description copied from interface:JmsMapMessageFacadeDetermines whether an item exists in this Map based message.- Specified by:
itemExistsin interfaceJmsMapMessageFacade- Parameters:
key- The entry key that is being searched for.- Returns:
- true if the item exists in the Map, false otherwise.
-
get
public Object get(String key)
Description copied from interface:JmsMapMessageFacadeGets the value stored in the Map at the specified key.- Specified by:
getin 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(String key, Object value)
Description copied from interface:JmsMapMessageFacadeSets 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:
putin 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 Object remove(String key)
Description copied from interface:JmsMapMessageFacadeRemove 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:
removein 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:JmsMessageFacadeClears the contents of this Message.- Specified by:
clearBodyin interfaceJmsMessageFacade- Overrides:
clearBodyin classAmqpJmsMessageFacade
-
hasBody
public boolean hasBody()
Description copied from interface:JmsMessageFacadeReturns true if the underlying message has a body, false if the body is empty.- Specified by:
hasBodyin interfaceJmsMessageFacade- Overrides:
hasBodyin classAmqpJmsMessageFacade- Returns:
- true if the underlying message has a body, false if the body is empty.
-
asJmsMessage
public JmsMapMessage asJmsMessage()
- Overrides:
asJmsMessagein classAmqpJmsMessageFacade
-
initializeEmptyBody
protected void initializeEmptyBody()
Description copied from class:AmqpJmsMessageFacadeUsed 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:
initializeEmptyBodyin classAmqpJmsMessageFacade
-
-