Class AtlasMapEndpoint
- 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.AtlasMapEndpoint
-
- 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="3.7.0", scheme="atlasmap", title="AtlasMap", syntax="atlasmap:resourceUri", producerOnly=true, category=TRANSFORMATION) public class AtlasMapEndpoint extends org.apache.camel.component.ResourceEndpointTransforms the message using an AtlasMap transformation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAtlasMapEndpoint.TargetMapMode
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_TYPE_JSONstatic StringCONTENT_TYPE_XML
-
Constructor Summary
Constructors Constructor Description AtlasMapEndpoint(String uri, AtlasMapComponent component, String resourceUri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcreateEndpointUri()AtlasMapEndpointfindOrCreateEndpoint(String uri, String newResourceUri)io.atlasmap.api.AtlasContextgetAtlasContext()io.atlasmap.api.AtlasContextFactorygetAtlasContextFactory()org.apache.camel.ExchangePatterngetExchangePattern()StringgetSourceMapName()AtlasMapEndpoint.TargetMapModegetTargetMapMode()StringgetTargetMapName()booleanisForceReload()protected voidonExchange(org.apache.camel.Exchange exchange)voidsetAtlasContext(io.atlasmap.api.AtlasContext atlasContext)voidsetAtlasContextFactory(io.atlasmap.api.AtlasContextFactory atlasContextFactory)voidsetForceReload(boolean forceReload)Whether to enable or disable force reload mode.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(AtlasMapEndpoint.TargetMapMode mode)AtlasMapEndpoint.TargetMapModeenum value to specify how multiple target documents are delivered if exist.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
configureExchange, configurePollingConsumer, createAsyncProducer, createExchange, createExchange, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, 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
-
-
-
-
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
-
AtlasMapEndpoint
public AtlasMapEndpoint(String uri, AtlasMapComponent component, String resourceUri)
-
-
Method Detail
-
getExchangePattern
public org.apache.camel.ExchangePattern getExchangePattern()
- Specified by:
getExchangePatternin interfaceorg.apache.camel.Endpoint- 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)
-
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, as well as message headers as source properties where the scope equals to Document ID.- 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(AtlasMapEndpoint.TargetMapMode mode)
AtlasMapEndpoint.TargetMapModeenum value to specify how multiple target documents are delivered if exist.- 'MAP': Stores them into a java.util.Map, and the java.util.Map is set to an exchange" property if 'targetMapName' is specified, otherwise message body. "
- 'MESSAGE_HEADER': Stores them into message headers. "
- 'EXCHANGE_PROPERTY': Stores them into exchange properties.
- Parameters:
mode-AtlasMapEndpoint.TargetMapMode
-
getTargetMapMode
public AtlasMapEndpoint.TargetMapMode getTargetMapMode()
-
setForceReload
public void setForceReload(boolean forceReload)
Whether to enable or disable force reload mode. This is set to false by default and ADM file is loaded from a file only on a first Exchange, and AtlasContext will be reused after that until endpoint is recreated. If this is set to true, ADM file will be loaded from a file on every Exchange.- Parameters:
forceReload- true to enable force reload
-
isForceReload
public boolean isForceReload()
-
findOrCreateEndpoint
public AtlasMapEndpoint findOrCreateEndpoint(String uri, String newResourceUri)
-
-