org.springframework.integration.xml.transformer
Class XmlPayloadUnmarshallingTransformer

java.lang.Object
  extended by org.springframework.integration.xml.transformer.XmlPayloadUnmarshallingTransformer
All Implemented Interfaces:
PayloadTransformer<java.lang.Object,java.lang.Object>

public class XmlPayloadUnmarshallingTransformer
extends java.lang.Object
implements PayloadTransformer<java.lang.Object,java.lang.Object>

An implementation of PayloadTransformer that delegates to an OXM Unmarshaller. Expects the payload to be of type Document, String, Source or to have an instance of SourceFactory that can convert to a Source. If alwaysUseSourceFactory is set to true then the SourceFactory will be used to create the Source regardless of payload type

Author:
Jonas Partner

Field Summary
private  boolean alwaysUseSourceFactory
           
private  SourceFactory sourceFactory
           
private  org.springframework.oxm.Unmarshaller unmarshaller
           
 
Constructor Summary
XmlPayloadUnmarshallingTransformer(org.springframework.oxm.Unmarshaller unmarshaller)
           
 
Method Summary
 void setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)
          If true always delegate to the SourceFactory
 void setSourceFactory(SourceFactory sourceFactory)
           
 java.lang.Object transform(java.lang.Object payload)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alwaysUseSourceFactory

private volatile boolean alwaysUseSourceFactory

unmarshaller

private final org.springframework.oxm.Unmarshaller unmarshaller

sourceFactory

private volatile SourceFactory sourceFactory
Constructor Detail

XmlPayloadUnmarshallingTransformer

public XmlPayloadUnmarshallingTransformer(org.springframework.oxm.Unmarshaller unmarshaller)
Method Detail

transform

public java.lang.Object transform(java.lang.Object payload)
Specified by:
transform in interface PayloadTransformer<java.lang.Object,java.lang.Object>

setAlwaysUseSourceFactory

public void setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)
If true always delegate to the SourceFactory

Parameters:
alwaysUseSourceFactory -

setSourceFactory

public void setSourceFactory(SourceFactory sourceFactory)
Parameters:
sourceFactory -