org.springframework.integration.xml.selector
Class XmlValidatingMessageSelector

java.lang.Object
  extended by org.springframework.integration.xml.selector.XmlValidatingMessageSelector
All Implemented Interfaces:
MessageSelector

public class XmlValidatingMessageSelector
extends java.lang.Object
implements MessageSelector

Since:
2.0

Constructor Summary
XmlValidatingMessageSelector(Resource schema, java.lang.String schemaType)
          Will create this selector with default XmlValidator which will be initialized with 'schema' location as Resource and 'schemaType' as either XmlValidatorFactory.SCHEMA_W3C_XML or XmlValidatorFactory.SCHEMA_RELAX_NG.
XmlValidatingMessageSelector(org.springframework.xml.validation.XmlValidator xmlValidator)
           
 
Method Summary
 boolean accept(Message<?> message)
           
 void setConverter(XmlPayloadConverter converter)
          Converter used to convert payloads prior to validation
 void setThrowExceptionOnRejection(boolean throwExceptionOnRejection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlValidatingMessageSelector

public XmlValidatingMessageSelector(org.springframework.xml.validation.XmlValidator xmlValidator)
                             throws java.lang.Exception
Throws:
java.lang.Exception

XmlValidatingMessageSelector

public XmlValidatingMessageSelector(Resource schema,
                                    java.lang.String schemaType)
                             throws java.io.IOException
Will create this selector with default XmlValidator which will be initialized with 'schema' location as Resource and 'schemaType' as either XmlValidatorFactory.SCHEMA_W3C_XML or XmlValidatorFactory.SCHEMA_RELAX_NG. If no 'schemaType' is provided it will default to XmlValidatorFactory.SCHEMA_W3C_XML;

Parameters:
schema -
schemaType -
Throws:
java.io.IOException
Method Detail

setThrowExceptionOnRejection

public void setThrowExceptionOnRejection(boolean throwExceptionOnRejection)

setConverter

public void setConverter(XmlPayloadConverter converter)
Converter used to convert payloads prior to validation

Parameters:
converter -

accept

public boolean accept(Message<?> message)
Specified by:
accept in interface MessageSelector