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 SourcegetSource(org.apache.camel.Exchange exchange)Creates a specificSourcedepending on the current message exchangedprotected SourcegetSource(org.apache.camel.Exchange exchange, Object body)booleanisFailOnNullBody()Returns 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
-
-
-
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: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.
-
-