Class RemoteInvocationAwareMessageConverterAdapter
- java.lang.Object
-
- org.springframework.amqp.support.converter.RemoteInvocationAwareMessageConverterAdapter
-
- All Implemented Interfaces:
MessageConverter
,Aware
,BeanClassLoaderAware
public class RemoteInvocationAwareMessageConverterAdapter extends 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 Object
fromMessage(Message message)
Convert from a Message to a Java object.void
setBeanClassLoader(ClassLoader classLoader)
Message
toMessage(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(ClassLoader classLoader)
- Specified by:
setBeanClassLoader
in interfaceBeanClassLoaderAware
-
toMessage
public Message toMessage(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 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
-
-