Package org.apache.camel.component.xslt
Class XmlSourceHandlerFactoryImpl
java.lang.Object
org.apache.camel.component.xslt.XmlSourceHandlerFactoryImpl
- All Implemented Interfaces:
SourceHandlerFactory
Handler for xml sources
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSource
(org.apache.camel.Exchange exchange) Creates a specificSource
depending on the current message exchangedprotected Source
boolean
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
-
Constructor Details
-
XmlSourceHandlerFactoryImpl
public XmlSourceHandlerFactoryImpl()
-
-
Method Details
-
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
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.
-
getSource
-