org.springframework.integration.gateway
Class SimpleMessageMapper

java.lang.Object
  extended by org.springframework.integration.gateway.SimpleMessageMapper
All Implemented Interfaces:
InboundMessageMapper<java.lang.Object>, OutboundMessageMapper<java.lang.Object>

public class SimpleMessageMapper
extends java.lang.Object
implements InboundMessageMapper<java.lang.Object>, OutboundMessageMapper<java.lang.Object>

An implementation of the InboundMessageMapper and OutboundMessageMapper strategy interfaces that maps directly to and from the Message payload instance.


Constructor Summary
SimpleMessageMapper()
           
 
Method Summary
 java.lang.Object fromMessage(Message<?> message)
          Returns the Message payload (or null if the Message is null).
 Message<?> toMessage(java.lang.Object object)
          Returns a Message with the given object as its payload, unless the object is already a Message in which case it will be returned as-is.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMessageMapper

public SimpleMessageMapper()
Method Detail

fromMessage

public java.lang.Object fromMessage(Message<?> message)
Returns the Message payload (or null if the Message is null).

Specified by:
fromMessage in interface OutboundMessageMapper<java.lang.Object>

toMessage

public Message<?> toMessage(java.lang.Object object)
Returns a Message with the given object as its payload, unless the object is already a Message in which case it will be returned as-is. If the object is null, the returned Message will also be null.

Specified by:
toMessage in interface InboundMessageMapper<java.lang.Object>