Class AtlasEndpoint
- 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.ResourceEndpoint
-
- org.apache.camel.component.atlasmap.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.ResourceEndpointTransforms the message using an AtlasMap transformation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAtlasEndpoint.TargetMapMode
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_TYPE_JSONstatic StringCONTENT_TYPE_XML
-
Constructor Summary
Constructors Constructor Description AtlasEndpoint(String uri, AtlasComponent component, String resourceUri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcreateEndpointUri()AtlasEndpointfindOrCreateEndpoint(String uri, String newResourceUri)io.atlasmap.api.AtlasContextgetAtlasContext()io.atlasmap.api.AtlasContextFactorygetAtlasContextFactory()StringgetEncoding()org.apache.camel.ExchangePatterngetExchangePattern()StringgetPropertiesFile()StringgetSourceMapName()AtlasEndpoint.TargetMapModegetTargetMapMode()StringgetTargetMapName()booleanisLoaderCache()booleanisSingleton()protected voidonExchange(org.apache.camel.Exchange exchange)voidsetAtlasContext(io.atlasmap.api.AtlasContext atlasContext)voidsetAtlasContextFactory(io.atlasmap.api.AtlasContextFactory atlasContextFactory)voidsetEncoding(String encoding)Character encoding of the resource content.voidsetLoaderCache(boolean loaderCache)Enables / disables the atlas map resource loader cache which is enabled by default.voidsetPropertiesFile(String file)The URI of the properties file which is used for AtlasContextFactory initialization.voidsetSourceMapName(String name)The Exchange property name for a source message map which holdjava.util.Map<String, Message>where the key is AtlasMap Document ID.voidsetTargetMapMode(AtlasEndpoint.TargetMapMode mode)AtlasEndpoint.TargetMapModeenum value to specify how multiple documents are delivered.voidsetTargetMapName(String name)The Exchange property name for a target document map which holdjava.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.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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
CONTENT_TYPE_JSON
public static final String CONTENT_TYPE_JSON
- See Also:
- Constant Field Values
-
CONTENT_TYPE_XML
public static final String CONTENT_TYPE_XML
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AtlasEndpoint
public AtlasEndpoint(String uri, AtlasComponent component, String resourceUri)
-
-
Method Detail
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingletonin interfaceorg.apache.camel.IsSingleton- Overrides:
isSingletonin classorg.apache.camel.support.DefaultEndpoint
-
getExchangePattern
public org.apache.camel.ExchangePattern getExchangePattern()
- Overrides:
getExchangePatternin classorg.apache.camel.support.DefaultEndpoint
-
createEndpointUri
protected String createEndpointUri()
- Overrides:
createEndpointUriin classorg.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 holdjava.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 holdjava.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()
-
setTargetMapMode
public void setTargetMapMode(AtlasEndpoint.TargetMapMode mode)
AtlasEndpoint.TargetMapModeenum value to specify how multiple documents are delivered.- Parameters:
mode-AtlasEndpoint.TargetMapMode
-
getTargetMapMode
public AtlasEndpoint.TargetMapMode getTargetMapMode()
-
findOrCreateEndpoint
public AtlasEndpoint findOrCreateEndpoint(String uri, String newResourceUri)
-
-