public class AmqpSerializedObjectDelegate extends Object implements AmqpObjectTypeDelegate
Constructor and Description |
---|
AmqpSerializedObjectDelegate(org.apache.qpid.proton.message.Message message)
Create a new delegate that uses Java serialization to store the message content.
|
Modifier and Type | Method and Description |
---|---|
Serializable |
getObject()
Read a Serialized object from the AMQP message using the strategy implemented
by this delegate.
|
boolean |
isAmqpTypeEncoded() |
void |
onSend()
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.
|
void |
setObject(Serializable value)
Given a serializable instance, store the value into the AMQP message using
the strategy implemented by this delegate.
|
public AmqpSerializedObjectDelegate(org.apache.qpid.proton.message.Message message)
message
- the AMQP message instance where the object is to be stored / read.public Serializable getObject() throws IOException, ClassNotFoundException
AmqpObjectTypeDelegate
getObject
in interface AmqpObjectTypeDelegate
IOException
- if an error occurs while reading the stored object.ClassNotFoundException
- if no class can be found for the stored type.public void setObject(Serializable value) throws IOException
AmqpObjectTypeDelegate
setObject
in interface AmqpObjectTypeDelegate
value
- A serializable object instance to be stored in the message.IOException
- if an error occurs during the store operation.public void onSend()
AmqpObjectTypeDelegate
onSend
in interface AmqpObjectTypeDelegate
public boolean isAmqpTypeEncoded()
isAmqpTypeEncoded
in interface AmqpObjectTypeDelegate
Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.