public class XPathMessageSplitter
extends org.springframework.integration.splitter.AbstractMessageSplitter
XPathExpression to split a
Document, File or String payload into a NodeList.
The return value will be either Strings or Nodes depending on the
received payload type. Additionally, node types will be converted to
Documents if the 'createDocuments' property is set to true.messagingTemplateEXPRESSION_PARSER, logger| Constructor and Description |
|---|
XPathMessageSplitter(java.lang.String expression) |
XPathMessageSplitter(java.lang.String expression,
java.util.Map<java.lang.String,java.lang.String> namespaces) |
XPathMessageSplitter(org.springframework.xml.xpath.XPathExpression xpathExpression) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInit() |
java.lang.String |
getComponentType() |
protected int |
obtainSizeIfPossible(java.util.Iterator<?> iterator) |
void |
setCreateDocuments(boolean createDocuments) |
void |
setDocumentBuilder(javax.xml.parsers.DocumentBuilderFactory documentBuilderFactory) |
void |
setIterator(boolean iterator)
The
iterator mode: true (default) to return an Iterator
for splitting payload, false to return a List. |
void |
setOutputProperties(java.util.Properties outputProperties)
A set of output properties that will be
used to override any of the same properties in affect
for the transformation.
|
void |
setXmlPayloadConverter(XmlPayloadConverter xmlPayloadConverter) |
protected java.lang.Object |
splitMessage(org.springframework.messaging.Message<?> message) |
addHeaders, handleRequestMessage, obtainSizeIfPossible, produceOutput, setApplySequence, shouldCopyRequestHeaders, willAddHeadersdoInvokeAdvisedRequestHandler, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplyaddNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldSplitOutput, updateNotPropagatedHeadersconfigureMetrics, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMinDuration, getOrder, getOverrides, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onComplete, onError, onNext, onSubscribe, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic XPathMessageSplitter(java.lang.String expression)
public XPathMessageSplitter(java.lang.String expression,
java.util.Map<java.lang.String,java.lang.String> namespaces)
public XPathMessageSplitter(org.springframework.xml.xpath.XPathExpression xpathExpression)
public void setCreateDocuments(boolean createDocuments)
public java.lang.String getComponentType()
getComponentType in interface org.springframework.integration.support.context.NamedComponentgetComponentType in class org.springframework.integration.splitter.AbstractMessageSplitterpublic void setDocumentBuilder(javax.xml.parsers.DocumentBuilderFactory documentBuilderFactory)
public void setXmlPayloadConverter(XmlPayloadConverter xmlPayloadConverter)
public void setIterator(boolean iterator)
iterator mode: true (default) to return an Iterator
for splitting payload, false to return a List.iterator - boolean flag for iterator mode. Default to true.public void setOutputProperties(java.util.Properties outputProperties)
outputProperties - the Transformer output properties.Transformer.setOutputProperties(Properties)protected void doInit()
doInit in class org.springframework.integration.handler.AbstractReplyProducingMessageHandlerprotected java.lang.Object splitMessage(org.springframework.messaging.Message<?> message)
splitMessage in class org.springframework.integration.splitter.AbstractMessageSplitterprotected int obtainSizeIfPossible(java.util.Iterator<?> iterator)
obtainSizeIfPossible in class org.springframework.integration.splitter.AbstractMessageSplitter