Class SmooksProcessor

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Processor, org.apache.camel.Service

    public class SmooksProcessor
    extends Object
    implements org.apache.camel.Processor, org.apache.camel.Service, org.apache.camel.CamelContextAware
    Smooks Processor for Camel.
    Author:
    Christian Mueller, Daniel Bevenius
    • Field Detail

      • EXCHANGE_TYPED_KEY

        public static final org.smooks.api.TypedKey<org.apache.camel.Exchange> EXCHANGE_TYPED_KEY
    • Constructor Detail

      • SmooksProcessor

        public SmooksProcessor​(org.apache.camel.CamelContext camelContext)
      • SmooksProcessor

        public SmooksProcessor​(org.smooks.Smooks smooks,
                               org.apache.camel.CamelContext camelContext)
    • Method Detail

      • process

        public void process​(org.apache.camel.Exchange exchange)
        Specified by:
        process in interface org.apache.camel.Processor
      • setResultOnBody

        protected void setResultOnBody​(org.smooks.io.payload.Exports exports,
                                       Result[] results,
                                       org.apache.camel.Exchange exchange)
      • getSmooksConfig

        public String getSmooksConfig()
      • setSmooksConfig

        public void setSmooksConfig​(String smooksConfig)
      • 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

        public SmooksProcessor addVisitor​(org.smooks.api.delivery.VisitorAppender appender)
        Add a visitor instance to this Smooks instance via a VisitorAppender.
        Parameters:
        appender - The visitor appender.
        Returns:
        This instance.
      • setReportPath

        public void setReportPath​(String reportPath)
      • start

        public void start()
        Specified by:
        start in interface org.apache.camel.Service
      • stop

        public void stop()
        Specified by:
        stop in interface org.apache.camel.Service
      • setCamelContext

        public void setCamelContext​(org.apache.camel.CamelContext camelContext)
        Specified by:
        setCamelContext in interface org.apache.camel.CamelContextAware
      • getCamelContext

        public org.apache.camel.CamelContext getCamelContext()
        Specified by:
        getCamelContext in interface org.apache.camel.CamelContextAware