Package org.apache.camel.component.jolt
Class JoltEndpoint
- 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.jolt.JoltEndpoint
-
- 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.16.0", scheme="jolt", title="JOLT", syntax="jolt:resourceUri", producerOnly=true, category=TRANSFORMATION, headersClass=JoltConstants.class) public class JoltEndpoint extends org.apache.camel.component.ResourceEndpointJSON to JSON transformation using JOLT.
-
-
Constructor Summary
Constructors Constructor Description JoltEndpoint()JoltEndpoint(String uri, JoltComponent component, String resourceUri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcreateEndpointUri()JoltEndpointfindOrCreateEndpoint(String uri, String newResourceUri)org.apache.camel.ExchangePatterngetExchangePattern()JoltInputOutputTypegetInputType()JoltInputOutputTypegetOutputType()JoltTransformTypegetTransformDsl()booleanisAllowTemplateFromHeader()protected voidonExchange(org.apache.camel.Exchange exchange)voidsetAllowTemplateFromHeader(boolean allowTemplateFromHeader)Whether to allow to use resource template from header or not (default false).voidsetInputType(JoltInputOutputType inputType)Specifies if the input is hydrated JSON or a JSON String.voidsetOutputType(JoltInputOutputType outputType)Specifies if the output should be hydrated JSON or a JSON String.voidsetTransform(com.bazaarvoice.jolt.JoltTransform transform)Sets the Transform to use.voidsetTransformDsl(JoltTransformType transformType)Specifies the Transform DSL of the endpoint resource.-
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
-
-
-
-
Constructor Detail
-
JoltEndpoint
public JoltEndpoint()
-
JoltEndpoint
public JoltEndpoint(String uri, JoltComponent 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
-
setTransform
public void setTransform(com.bazaarvoice.jolt.JoltTransform transform)
Sets the Transform to use. If not set a Transform specified by the transformDsl will be created
-
getOutputType
public JoltInputOutputType getOutputType()
-
setOutputType
public void setOutputType(JoltInputOutputType outputType)
Specifies if the output should be hydrated JSON or a JSON String.
-
getInputType
public JoltInputOutputType getInputType()
-
setInputType
public void setInputType(JoltInputOutputType inputType)
Specifies if the input is hydrated JSON or a JSON String.
-
getTransformDsl
public JoltTransformType getTransformDsl()
-
setTransformDsl
public void setTransformDsl(JoltTransformType transformType)
Specifies the Transform DSL of the endpoint resource. If none is specifiedChainrwill be used.
-
isAllowTemplateFromHeader
public boolean isAllowTemplateFromHeader()
-
setAllowTemplateFromHeader
public void setAllowTemplateFromHeader(boolean allowTemplateFromHeader)
Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential security vulnerability if the header is coming from a malicious user, so use this with care.
-
findOrCreateEndpoint
public JoltEndpoint findOrCreateEndpoint(String uri, String newResourceUri)
-
-