public class FilteringXmlMessageSplitter extends AbstractMessageSplitter
FilteringXmlMessageSplitter
will split a DOM4J document into nodes
based on the "splitExpression" property. Optionally, you can specify a
namespaces
property map that contain prefix/namespace mappings.
Mind if you have a default namespace declared you should map it to some namespace,
and reference it in the splitExpression
property. The splitter
can optionally validate against an XML schema. By default schema validation is
turned off. You may reference an external schema from the classpath by using
the externalSchemaLocation
property. Note that each part
returned is actually returned as a new Document.Modifier and Type | Field and Description |
---|---|
protected String |
externalSchemaLocation |
protected Map |
namespaces |
protected ThreadLocal |
nodesContext |
protected ThreadLocal |
propertiesContext |
protected String |
splitExpression |
protected boolean |
validateSchema |
honorSynchronicity, multimatch
ENABLE_CORRELATION_ALWAYS, ENABLE_CORRELATION_IF_NOT_SET, ENABLE_CORRELATION_NEVER, enableCorrelation, endpoints, logger, messageInfoMapping, replyTo, transactionConfig
muleContext
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
FilteringXmlMessageSplitter() |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup()
This method is called after all parts of the original message have been processed;
typically this is the case after
AbstractMessageSplitter.getMessagePart(MuleMessage, OutboundEndpoint)
returned null . |
String |
getExternalSchemaLocation() |
protected MuleMessage |
getMessagePart(MuleMessage message,
OutboundEndpoint endpoint)
Retrieves a specific message part for the given endpoint.
|
Map |
getNamespaces() |
String |
getSplitExpression() |
protected void |
initialise(MuleMessage message)
Template method can be used to split the message up before the getMessagePart
method is called .
|
boolean |
isValidateSchema() |
void |
setExternalSchemaLocation(String externalSchemaLocation)
Set classpath location of the XSD to check against.
|
void |
setNamespaces(Map namespaces) |
void |
setSplitExpression(String splitExpression) |
void |
setValidateSchema(boolean validateSchema) |
isHonorSynchronicity, route, setHonorSynchronicity
addEndpoint, getEndpoint, getFilter, getTransformers, isMatch, isUseTemplates, setFilter, setTransformers, setUseTemplates
createTransactionTemplate, dispatch, getEnableCorrelation, getEndpoint, getEndpoints, getMessageInfoMapping, getReplyTo, getTransactionConfig, isDynamicEndpoints, removeEndpoint, send, setEnableCorrelation, setEnableCorrelationAsString, setEndpoints, setMessageInfoMapping, setMessageProperties, setReplyTo, setTransactionConfig
dispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, setRouterStatistics
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRouterStatistics, setRouterStatistics
initialise
dispose
protected final ThreadLocal propertiesContext
protected final ThreadLocal nodesContext
protected volatile String splitExpression
protected volatile Map namespaces
protected volatile boolean validateSchema
protected volatile String externalSchemaLocation
public void setSplitExpression(String splitExpression)
public void setNamespaces(Map namespaces)
public Map getNamespaces()
public String getSplitExpression()
public boolean isValidateSchema()
public void setValidateSchema(boolean validateSchema)
public String getExternalSchemaLocation()
public void setExternalSchemaLocation(String externalSchemaLocation)
externalSchemaLocation
- location of XSDprotected void initialise(MuleMessage message)
initialise
in class AbstractMessageSplitter
message
- the message being routedprotected void cleanup()
AbstractMessageSplitter
AbstractMessageSplitter.getMessagePart(MuleMessage, OutboundEndpoint)
returned null
.cleanup
in class AbstractMessageSplitter
protected MuleMessage getMessagePart(MuleMessage message, OutboundEndpoint endpoint)
getMessagePart
in class AbstractMessageSplitter
message
- the current message being processedendpoint
- the endpoint that will be used to route the resulting message
partCopyright © 2003–2013 MuleSource, Inc.. All rights reserved.