Class AmqpTypedObjectDelegate
java.lang.Object
org.apache.qpid.jms.provider.amqp.message.AmqpTypedObjectDelegate
- All Implemented Interfaces:
AmqpObjectTypeDelegate
Wrapper around an AMQP Message instance that will be treated as a JMS ObjectMessage
type.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new delegate that uses Java serialization to store the message content. -
Method Summary
Modifier and TypeMethodDescriptionvoidCopy the internal data into the given instance.Read a Serialized object from the AMQP message using the strategy implemented by this delegate.booleanhasBody()booleanvoidonSend()Signals that the message is about to be sent so we should ensure proper state of the marshaled object and message annotations prior to that.voidsetObject(Serializable value) Given a serializable instance, store the value into the AMQP message using the strategy implemented by this delegate.
-
Constructor Details
-
AmqpTypedObjectDelegate
Create a new delegate that uses Java serialization to store the message content.- Parameters:
parent- the AMQP message facade instance where the object is to be stored / read.
-
-
Method Details
-
getObject
Description copied from interface:AmqpObjectTypeDelegateRead a Serialized object from the AMQP message using the strategy implemented by this delegate.- Specified by:
getObjectin interfaceAmqpObjectTypeDelegate- Returns:
- an Object that has been read from the stored object data in the message.
- Throws:
IOException- if an error occurs while reading the stored object.ClassNotFoundException- if no class can be found for the stored type.
-
setObject
Description copied from interface:AmqpObjectTypeDelegateGiven a serializable instance, store the value into the AMQP message using the strategy implemented by this delegate.- Specified by:
setObjectin interfaceAmqpObjectTypeDelegate- Parameters:
value- A serializable object instance to be stored in the message.- Throws:
IOException- if an error occurs during the store operation.
-
onSend
public void onSend()Description copied from interface:AmqpObjectTypeDelegateSignals that the message is about to be sent so we should ensure proper state of the marshaled object and message annotations prior to that.- Specified by:
onSendin interfaceAmqpObjectTypeDelegate
-
copyInto
Description copied from interface:AmqpObjectTypeDelegateCopy the internal data into the given instance.- Specified by:
copyIntoin interfaceAmqpObjectTypeDelegate- Parameters:
copy- the new delegate that will receive a copy of this instances object data.- Throws:
Exception- if an error occurs while copying the contents to the target.
-
isAmqpTypeEncoded
public boolean isAmqpTypeEncoded()- Specified by:
isAmqpTypeEncodedin interfaceAmqpObjectTypeDelegate
-
hasBody
public boolean hasBody()- Specified by:
hasBodyin interfaceAmqpObjectTypeDelegate
-