Package org.apache.camel.component.xslt
Class XmlSourceHandlerFactoryImpl
- java.lang.Object
-
- org.apache.camel.component.xslt.XmlSourceHandlerFactoryImpl
-
- All Implemented Interfaces:
SourceHandlerFactory
public class XmlSourceHandlerFactoryImpl extends Object implements SourceHandlerFactory
Handler for xml sources
-
-
Constructor Summary
Constructors Constructor Description XmlSourceHandlerFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Source
getSource(org.apache.camel.Exchange exchange)
Creates a specificSource
depending on the current message exchangedprotected Source
getSource(org.apache.camel.Exchange exchange, Object body)
boolean
isFailOnNullBody()
Returns true if we fail when the body is null.protected boolean
isInputStreamNeeded(org.apache.camel.Exchange exchange)
Checks whether we need anInputStream
to access the message body.void
setFailOnNullBody(boolean failOnNullBody)
Set if we should fail when the body is null
-
-
-
Method Detail
-
isFailOnNullBody
public boolean isFailOnNullBody()
Returns true if we fail when the body is null.
-
setFailOnNullBody
public void setFailOnNullBody(boolean failOnNullBody)
Set if we should fail when the body is null
-
getSource
public Source getSource(org.apache.camel.Exchange exchange) throws Exception
Description copied from interface:SourceHandlerFactory
Creates a specificSource
depending on the current message exchanged- Specified by:
getSource
in interfaceSourceHandlerFactory
- Parameters:
exchange
- the exchange- Returns:
- the source created from the message
- Throws:
Exception
- if the source couldn't be created
-
isInputStreamNeeded
protected boolean isInputStreamNeeded(org.apache.camel.Exchange exchange)
Checks whether we need anInputStream
to access the message body. Depending on the content in the message body, we may not need to convert toInputStream
.- Parameters:
exchange
- the current exchange- Returns:
- true to convert to
InputStream
beforehand converting toSource
afterwards.
-
-