Class SmooksProcessor
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.smooks.SmooksProcessor
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.Processor,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
public class SmooksProcessor
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.Processor, org.apache.camel.CamelContextAware
Smooks
Processor for Camel.-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionSmooksProcessor(String configUri, org.apache.camel.CamelContext camelContext) SmooksProcessor(org.apache.camel.CamelContext camelContext) SmooksProcessor(org.smooks.Smooks smooks, org.apache.camel.CamelContext camelContext) -
Method Summary
Modifier and TypeMethodDescriptionaddVisitor(org.smooks.api.delivery.VisitorAppender appender) Add a visitor instance tothisSmooks instance via aVisitorAppender.addVisitor(org.smooks.api.resource.visitor.Visitor visitor, String targetSelector) Add a visitor instance.protected voiddoStart()protected voiddoStop()org.apache.camel.CamelContextorg.smooks.SmooksFactoryvoidprocess(org.apache.camel.Exchange exchange) voidsetAllowExecutionContextFromHeader(Boolean allowExecutionContextFromHeader) voidsetCamelContext(org.apache.camel.CamelContext camelContext) voidsetLazyStartProducer(Boolean lazyStartProducer) voidsetReportPath(String reportPath) protected voidsetResultOnBody(org.smooks.io.payload.Exports exports, org.smooks.api.io.Sink[] sinks, org.apache.camel.Exchange exchange) voidsetSmooksConfig(String smooksConfig) voidsetSmooksFactory(org.smooks.SmooksFactory smooksFactory) toString()Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
SmooksProcessor
public SmooksProcessor(org.apache.camel.CamelContext camelContext) -
SmooksProcessor
public SmooksProcessor(org.smooks.Smooks smooks, org.apache.camel.CamelContext camelContext) -
SmooksProcessor
public SmooksProcessor(String configUri, org.apache.camel.CamelContext camelContext) throws IOException, SAXException - Throws:
IOExceptionSAXException
-
-
Method Details
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContextin interfaceorg.apache.camel.CamelContextAware
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContextin interfaceorg.apache.camel.spi.HasCamelContext
-
getAllowExecutionContextFromHeader
-
setAllowExecutionContextFromHeader
-
process
public void process(org.apache.camel.Exchange exchange) - Specified by:
processin interfaceorg.apache.camel.Processor
-
setResultOnBody
protected void setResultOnBody(org.smooks.io.payload.Exports exports, org.smooks.api.io.Sink[] sinks, org.apache.camel.Exchange exchange) -
getSmooksConfig
-
setSmooksConfig
-
addVisitor
public SmooksProcessor addVisitor(org.smooks.api.resource.visitor.Visitor visitor, String targetSelector) Add a visitor instance.- Parameters:
visitor- The visitor implementation.targetSelector- The message fragment target selector.- Returns:
- This instance.
-
addVisitor
Add a visitor instance tothisSmooks instance via aVisitorAppender.- Parameters:
appender- The visitor appender.- Returns:
- This instance.
-
setReportPath
-
getSmooksFactory
public org.smooks.SmooksFactory getSmooksFactory() -
setSmooksFactory
public void setSmooksFactory(org.smooks.SmooksFactory smooksFactory) -
getLazyStartProducer
-
setLazyStartProducer
-
doStart
protected void doStart()- Overrides:
doStartin classorg.apache.camel.support.service.BaseService
-
doStop
protected void doStop()- Overrides:
doStopin classorg.apache.camel.support.service.BaseService
-
toString
-