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 specificSourcedepending on the current message exchangedprotected SourcebooleanReturns true if we fail when the body is null.protected booleanisInputStreamNeeded(org.apache.camel.Exchange exchange) Checks whether we need anInputStreamto access the message body.voidsetFailOnNullBody(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:SourceHandlerFactoryCreates a specificSourcedepending on the current message exchanged- Specified by:
getSourcein 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 anInputStreamto 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
InputStreambeforehand converting toSourceafterwards.
-
getSource
-