public class AmqpSerializedObjectDelegate extends Object implements AmqpObjectTypeDelegate, ClassLoadingAwareObjectInputStream.TrustedClassFilter
| Constructor and Description |
|---|
AmqpSerializedObjectDelegate(AmqpJmsMessageFacade parent,
JmsDeserializationPolicy deserializationPolicy)
Create a new delegate that uses Java serialization to store the message content.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyInto(AmqpObjectTypeDelegate copy)
Copy the internal data into the given instance.
|
Serializable |
getObject()
Read a Serialized object from the AMQP message using the strategy implemented
by this delegate.
|
boolean |
hasBody() |
boolean |
isAmqpTypeEncoded() |
boolean |
isTrusted(Class<?> clazz) |
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(AmqpJmsMessageFacade parent, JmsDeserializationPolicy deserializationPolicy)
parent - the AMQP message facade instance where the object is to be stored / read.deserializationPolicy - the JmsDeserializationPolicy that is used to validate the security of message
content, may be null (e.g on new outgoing messages).public Serializable getObject() throws IOException, ClassNotFoundException
AmqpObjectTypeDelegategetObject in interface AmqpObjectTypeDelegateIOException - 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
AmqpObjectTypeDelegatesetObject in interface AmqpObjectTypeDelegatevalue - A serializable object instance to be stored in the message.IOException - if an error occurs during the store operation.public void onSend()
AmqpObjectTypeDelegateonSend in interface AmqpObjectTypeDelegatepublic void copyInto(AmqpObjectTypeDelegate copy) throws Exception
AmqpObjectTypeDelegatecopyInto in interface AmqpObjectTypeDelegatecopy - the new delegate that will receive a copy of this instances object data.Exception - if an error occurs while copying the contents to the target.public boolean isAmqpTypeEncoded()
isAmqpTypeEncoded in interface AmqpObjectTypeDelegatepublic boolean isTrusted(Class<?> clazz)
isTrusted in interface ClassLoadingAwareObjectInputStream.TrustedClassFilterpublic boolean hasBody()
hasBody in interface AmqpObjectTypeDelegateCopyright © 2013–2019 The Apache Software Foundation. All rights reserved.