Class RemoteInvocationAwareMessageConverterAdapter
- java.lang.Object
-
- org.springframework.amqp.support.converter.RemoteInvocationAwareMessageConverterAdapter
-
- All Implemented Interfaces:
MessageConverter
,Aware
,BeanClassLoaderAware
public class RemoteInvocationAwareMessageConverterAdapter extends java.lang.Object implements MessageConverter, BeanClassLoaderAware
A delegating adapter that unwrapsRemoteInvocationResult
after invoking the delegate to convert from a message. Delegates to aSimpleMessageConverter
by default.- Since:
- 2.0
- Author:
- Gary Russell
-
-
Constructor Summary
Constructors Constructor Description RemoteInvocationAwareMessageConverterAdapter()
RemoteInvocationAwareMessageConverterAdapter(MessageConverter delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
fromMessage(Message message)
Convert from a Message to a Java object.void
setBeanClassLoader(java.lang.ClassLoader classLoader)
Message
toMessage(java.lang.Object object, MessageProperties messageProperties)
Convert a Java object to a Message.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.amqp.support.converter.MessageConverter
toMessage
-
-
-
-
Constructor Detail
-
RemoteInvocationAwareMessageConverterAdapter
public RemoteInvocationAwareMessageConverterAdapter()
-
RemoteInvocationAwareMessageConverterAdapter
public RemoteInvocationAwareMessageConverterAdapter(MessageConverter delegate)
-
-
Method Detail
-
setBeanClassLoader
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
- Specified by:
setBeanClassLoader
in interfaceBeanClassLoaderAware
-
toMessage
public Message toMessage(java.lang.Object object, MessageProperties messageProperties) throws MessageConversionException
Description copied from interface:MessageConverter
Convert a Java object to a Message.- Specified by:
toMessage
in interfaceMessageConverter
- Parameters:
object
- the object to convertmessageProperties
- The message properties.- Returns:
- the Message
- Throws:
MessageConversionException
- in case of conversion failure
-
fromMessage
public java.lang.Object fromMessage(Message message) throws MessageConversionException
Description copied from interface:MessageConverter
Convert from a Message to a Java object.- Specified by:
fromMessage
in interfaceMessageConverter
- Parameters:
message
- the message to convert- Returns:
- the converted Java object
- Throws:
MessageConversionException
- in case of conversion failure
-
-