Class XJEndpoint

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.support.ScheduledPollEndpoint
org.apache.camel.support.DefaultPollingEndpoint
org.apache.camel.support.ProcessorEndpoint
org.apache.camel.component.xslt.XsltEndpoint
org.apache.camel.component.xslt.saxon.XsltSaxonEndpoint
org.apache.camel.component.xj.XJEndpoint
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.ComponentAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

@ManagedResource(description="Managed XJEndpoint") @UriEndpoint(firstVersion="3.0.0", scheme="xj", title="XJ", syntax="xj:resourceUri", producerOnly=true, remote=false, category=TRANSFORMATION, headersClass=XJConstants.class) public class XJEndpoint extends org.apache.camel.component.xslt.saxon.XsltSaxonEndpoint
Transform JSON and XML message using a XSLT.
  • 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

    Constructors
    Constructor
    Description
    XJEndpoint(String endpointUri, org.apache.camel.Component component)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    configureInput(org.apache.camel.component.xslt.XsltBuilder xsltBuilder)
    Configures the source input depending on the transformDirection
    protected void
    configureJsonOutput(org.apache.camel.component.xslt.XsltBuilder xsltBuilder, String output)
    Configures the result output when transforming to JSON
    protected void
    configureOutput(org.apache.camel.component.xslt.XsltBuilder xsltBuilder, String output)
    Configures the result output depending on the transformDirection
    protected org.apache.camel.component.xslt.saxon.XsltSaxonBuilder
     
    protected void
     
     
    void
    Sets the transform direction.

    Methods inherited from class org.apache.camel.component.xslt.saxon.XsltSaxonEndpoint

    createBuilderForCustomStylesheet, doStart, getSaxonConfiguration, getSaxonConfigurationProperties, getSaxonExtensionFunctions, getSaxonReaderProperties, isAllowStAX, isSecureProcessing, loadResource, setAllowStAX, setSaxonConfiguration, setSaxonConfigurationProperties, setSaxonExtensionFunctions, setSaxonExtensionFunctions, setSaxonReaderProperties, setSecureProcessing

    Methods inherited from class org.apache.camel.component.xslt.XsltEndpoint

    clearCachedStylesheet, doStop, findOrCreateEndpoint, getEntityResolver, getErrorListener, getOutput, getParameters, getResourceUri, getResultHandlerFactory, getTransformerCacheSize, getTransformerFactory, getTransformerFactoryClass, getTransformerFactoryConfigurationStrategy, getUriResolver, getXslt, getXsltMessageLogger, isAllowTemplateFromHeader, isCacheCleared, isCacheStylesheet, isContentCache, isDeleteOutputFile, isFailOnNullBody, onExchange, setAllowTemplateFromHeader, setCacheCleared, setContentCache, setDeleteOutputFile, setEntityResolver, setErrorListener, setFailOnNullBody, setOutput, setParameters, setResourceUri, setResultHandlerFactory, setTransformerCacheSize, setTransformerFactory, setTransformerFactoryClass, setTransformerFactoryConfigurationStrategy, setUriResolver, setXslt, setXsltMessageLogger

    Methods inherited from class org.apache.camel.support.ProcessorEndpoint

    createPollingConsumer, createProcessor, createProducer, getProcessor, setProcessor

    Methods inherited from class org.apache.camel.support.DefaultPollingEndpoint

    createConsumer

    Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint

    configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay

    Methods inherited from class org.apache.camel.support.DefaultEndpoint

    configureExchange, configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString

    Methods inherited from class org.apache.camel.support.service.BaseService

    build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.camel.ComponentAware

    getComponent

    Methods inherited from interface org.apache.camel.Endpoint

    getEndpointBaseUri, isSingletonProducer

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Constructor Details

    • XJEndpoint

      public XJEndpoint(String endpointUri, org.apache.camel.Component component)
  • Method Details

    • getTransformDirection

      @ManagedAttribute(description="Transform direction") public TransformDirection getTransformDirection()
    • setTransformDirection

      public void setTransformDirection(TransformDirection transformDirection)
      Sets the transform direction.
    • doInit

      protected void doInit() throws Exception
      Overrides:
      doInit in class org.apache.camel.component.xslt.saxon.XsltSaxonEndpoint
      Throws:
      Exception
    • createXsltBuilder

      protected org.apache.camel.component.xslt.saxon.XsltSaxonBuilder createXsltBuilder() throws Exception
      Overrides:
      createXsltBuilder in class org.apache.camel.component.xslt.saxon.XsltSaxonEndpoint
      Throws:
      Exception
    • configureInput

      protected void configureInput(org.apache.camel.component.xslt.XsltBuilder xsltBuilder)
      Configures the source input depending on the transformDirection
    • configureOutput

      protected void configureOutput(org.apache.camel.component.xslt.XsltBuilder xsltBuilder, String output) throws Exception
      Configures the result output depending on the transformDirection
      Overrides:
      configureOutput in class org.apache.camel.component.xslt.XsltEndpoint
      Throws:
      Exception
    • configureJsonOutput

      protected void configureJsonOutput(org.apache.camel.component.xslt.XsltBuilder xsltBuilder, String output)
      Configures the result output when transforming to JSON