Class AtlasEndpoint

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.api.management.mbean.ManagedResourceEndpointMBean, org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    @UriEndpoint(firstVersion="2.19.0",
                 scheme="atlas",
                 title="AtlasMap",
                 syntax="atlas:resourceUri",
                 producerOnly=true,
                 label="transformation")
    public class AtlasEndpoint
    extends org.apache.camel.component.ResourceEndpoint
    Transforms the message using an AtlasMap transformation.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String CONTENT_TYPE_JSON  
      static String CONTENT_TYPE_XML  
      • Fields inherited from class org.apache.camel.component.ResourceEndpoint

        log
      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILDED, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTINGDOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected String createEndpointUri()  
      AtlasEndpoint findOrCreateEndpoint​(String uri, String newResourceUri)  
      io.atlasmap.api.AtlasContext getAtlasContext()  
      io.atlasmap.api.AtlasContextFactory getAtlasContextFactory()  
      String getEncoding()  
      org.apache.camel.ExchangePattern getExchangePattern()  
      String getPropertiesFile()  
      String getSourceMapName()  
      AtlasEndpoint.TargetMapMode getTargetMapMode()  
      String getTargetMapName()  
      boolean isLoaderCache()  
      boolean isSingleton()  
      protected void onExchange​(org.apache.camel.Exchange exchange)  
      void setAtlasContext​(io.atlasmap.api.AtlasContext atlasContext)  
      void setAtlasContextFactory​(io.atlasmap.api.AtlasContextFactory atlasContextFactory)  
      void setEncoding​(String encoding)
      Character encoding of the resource content.
      void setLoaderCache​(boolean loaderCache)
      Enables / disables the atlas map resource loader cache which is enabled by default.
      void setPropertiesFile​(String file)
      The URI of the properties file which is used for AtlasContextFactory initialization.
      void setSourceMapName​(String name)
      The Exchange property name for a source message map which hold java.util.Map<String, Message> where the key is AtlasMap Document ID.
      void setTargetMapMode​(AtlasEndpoint.TargetMapMode mode)
      AtlasEndpoint.TargetMapMode enum value to specify how multiple documents are delivered.
      void setTargetMapName​(String name)
      The Exchange property name for a target document map which hold java.util.Map<String, Object> where the key is AtlasMap Document ID.
      • Methods inherited from class org.apache.camel.component.ResourceEndpoint

        clearContentCache, getCamelId, getCamelManagementName, getResourceAsInputStream, getResourceAsInputStreamWithoutCache, getResourceUri, getState, isAllowContextMapAll, isContentCache, isContentCacheCleared, loadResource, setAllowContextMapAll, setContentCache, setResourceUri
      • 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, doStart, doStop, 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

        configurePollingConsumer, createAsyncProducer, createExchange, createExchange, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, 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 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
    • Method Detail

      • isSingleton

        public boolean isSingleton()
        Specified by:
        isSingleton in interface org.apache.camel.IsSingleton
        Overrides:
        isSingleton in class org.apache.camel.support.DefaultEndpoint
      • getExchangePattern

        public org.apache.camel.ExchangePattern getExchangePattern()
        Overrides:
        getExchangePattern in class org.apache.camel.support.DefaultEndpoint
      • createEndpointUri

        protected String createEndpointUri()
        Overrides:
        createEndpointUri in class org.apache.camel.support.DefaultEndpoint
      • getAtlasContextFactory

        public io.atlasmap.api.AtlasContextFactory getAtlasContextFactory()
      • setAtlasContextFactory

        public void setAtlasContextFactory​(io.atlasmap.api.AtlasContextFactory atlasContextFactory)
      • getAtlasContext

        public io.atlasmap.api.AtlasContext getAtlasContext()
      • setAtlasContext

        public void setAtlasContext​(io.atlasmap.api.AtlasContext atlasContext)
      • isLoaderCache

        public boolean isLoaderCache()
      • setLoaderCache

        public void setLoaderCache​(boolean loaderCache)
        Enables / disables the atlas map resource loader cache which is enabled by default.
        Parameters:
        loaderCache - true to enable loader cache
      • setEncoding

        public void setEncoding​(String encoding)
        Character encoding of the resource content.
        Parameters:
        encoding - encoding
      • getEncoding

        public String getEncoding()
      • setPropertiesFile

        public void setPropertiesFile​(String file)
        The URI of the properties file which is used for AtlasContextFactory initialization.
        Parameters:
        file - property file path
      • getPropertiesFile

        public String getPropertiesFile()
      • setSourceMapName

        public void setSourceMapName​(String name)
        The Exchange property name for a source message map which hold java.util.Map<String, Message> where the key is AtlasMap Document ID. AtlasMap consumes Message bodies as source documents.
        Parameters:
        name - Exchange property name for source map
      • getSourceMapName

        public String getSourceMapName()
      • setTargetMapName

        public void setTargetMapName​(String name)
        The Exchange property name for a target document map which hold java.util.Map<String, Object> where the key is AtlasMap Document ID. AtlasMap populates multiple target documents into this map.
        Parameters:
        name - Exchange property name for target map
      • getTargetMapName

        public String getTargetMapName()
      • onExchange

        protected void onExchange​(org.apache.camel.Exchange exchange)
                           throws Exception
        Overrides:
        onExchange in class org.apache.camel.support.ProcessorEndpoint
        Throws:
        Exception