Class AmqpJmsObjectMessageFacade
java.lang.Object
org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
org.apache.qpid.jms.provider.amqp.message.AmqpJmsObjectMessageFacade
- All Implemented Interfaces:
JmsMessageFacade,JmsObjectMessageFacade,TraceableMessage
public class AmqpJmsObjectMessageFacade
extends AmqpJmsMessageFacade
implements JmsObjectMessageFacade
Wrapper around an AMQP Message instance that will be treated as a JMS ObjectMessage
type.
-
Field Summary
Fields inherited from class org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
connection -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the contents of this Message.copy()Create a new instance and perform a deep copy of this object's contents.byteGets the Object value that is contained in the provider message.booleanhasBody()Returns true if the underlying message has a body, false if the body is empty.voidinitialize(AmqpConnection connection) Initialize the state of this message for send.voidinitialize(AmqpConsumer consumer) Initialize the state of this message for receive.booleanvoidonSend(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.voidsetObject(Serializable value) Stores the given object into the provider Message.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, initializeEmptyBody, isDeliveryTimeTransmitted, isPersistent, isRedelivered, onDispatch, 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, setUserIdBytesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, propertyExists, setCorrelationId, setCorrelationIdBytes, setDeliveryCount, setDeliveryTime, setDestination, setExpiration, setGroupId, setGroupSequence, setMessageId, setPersistent, setPriority, setProperty, setProviderMessageIdObject, setRedelivered, setRedeliveryCount, setReplyTo, setTimestamp, setType, setUserId, setUserIdBytesMethods inherited from interface org.apache.qpid.jms.tracing.TraceableMessage
filterTracingAnnotations, getTracingAnnotation, getTracingContext, removeTracingAnnotation, removeTracingContext, setTracingAnnotation, setTracingContext
-
Constructor Details
-
AmqpJmsObjectMessageFacade
public AmqpJmsObjectMessageFacade()
-
-
Method Details
-
initialize
Description copied from class:AmqpJmsMessageFacadeInitialize the state of this message for send.- Overrides:
initializein classAmqpJmsMessageFacade- Parameters:
connection- The connection that this message is linked to.
-
initialize
Description copied from class:AmqpJmsMessageFacadeInitialize the state of this message for receive.- Overrides:
initializein classAmqpJmsMessageFacade- Parameters:
consumer- The consumer that this message was read from.
-
getJmsMsgType
public byte getJmsMsgType()- Overrides:
getJmsMsgTypein classAmqpJmsMessageFacade- Returns:
- the appropriate byte value that indicates the type of message this is.
-
isAmqpTypedEncoding
public boolean isAmqpTypedEncoding() -
copy
Description copied from interface:JmsMessageFacadeCreate a new instance and perform a deep copy of this object's contents.- Specified by:
copyin interfaceJmsMessageFacade- Specified by:
copyin interfaceJmsObjectMessageFacade- Overrides:
copyin classAmqpJmsMessageFacade- Returns:
- a copy of this JmsMessageFacade instance.
- Throws:
jakarta.jms.JMSException- if an error occurs while copying the message.
-
getObject
Description copied from interface:JmsObjectMessageFacadeGets the Object value that is contained in the provider message. If the Object is stored in some serialized form then the Provider must de-serialize the object prior to returning it.- Specified by:
getObjectin interfaceJmsObjectMessageFacade- Returns:
- the de-serialized version of the contained object.
- Throws:
IOException- if the provider fails to get the object due to some internal error.ClassNotFoundException- if object de-serialization fails because the ClassLoader cannot find the Class locally.
-
setObject
Description copied from interface:JmsObjectMessageFacadeStores the given object into the provider Message. In order for the provider to be fully JMS compliant the set Object should be immediately serialized and stored so that future modifications to the object are not reflected in the stored version of the object.- Specified by:
setObjectin interfaceJmsObjectMessageFacade- Parameters:
value- the new value to write to the provider message.- Throws:
IOException- if the provider fails to store the object due to some internal error.
-
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.
-
onSend
public void onSend(long producerTtl) throws jakarta.jms.JMSException Description copied from interface:JmsMessageFacadeCalled 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. The method allows for passing through producer configuration details not explicitly mapped into the JMS Message allowing the facade to create the most correct and compact message on the wire.- Specified by:
onSendin interfaceJmsMessageFacade- Overrides:
onSendin classAmqpJmsMessageFacade- Parameters:
producerTtl- the time to live value configured on the producer when sent.- Throws:
jakarta.jms.JMSException- if an error occurs while preparing the message for send.
-
asJmsMessage
- Overrides:
asJmsMessagein classAmqpJmsMessageFacade
-