org.springframework.integration.xml.selector
Class XmlValidatingMessageSelector
java.lang.Object
org.springframework.integration.xml.selector.XmlValidatingMessageSelector
- All Implemented Interfaces:
- MessageSelector
public class XmlValidatingMessageSelector
- extends java.lang.Object
- implements MessageSelector
- Since:
- 2.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlValidatingMessageSelector
public XmlValidatingMessageSelector(org.springframework.xml.validation.XmlValidator xmlValidator)
XmlValidatingMessageSelector
public XmlValidatingMessageSelector(Resource schema,
java.lang.String schemaType)
throws java.io.IOException
- Creates a selector with a default
XmlValidator
. The validator will be initialized with
the provided 'schema' location Resource
and 'schemaType'. The valid options for schema
type are XmlValidatorFactory.SCHEMA_W3C_XML
or XmlValidatorFactory.SCHEMA_RELAX_NG
.
If no 'schemaType' is provided it will default to XmlValidatorFactory.SCHEMA_W3C_XML
;
- Throws:
java.io.IOException
- if the XmlValidatorFactory fails to create a validator
setThrowExceptionOnRejection
public void setThrowExceptionOnRejection(boolean throwExceptionOnRejection)
setConverter
public void setConverter(XmlPayloadConverter converter)
- Specify the Converter to use when converting payloads prior to validation.
accept
public boolean accept(Message<?> message)
- Specified by:
accept
in interface MessageSelector