Package org.apache.camel.support
Class ProcessorEndpoint
- 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
-
- All Implemented Interfaces:
AutoCloseable
,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
- Direct Known Subclasses:
ResourceEndpoint
public class ProcessorEndpoint extends DefaultPollingEndpoint
An endpoint which allows exchanges to be sent into it which just invokes a givenProcessor
. This component does not support the use of consumers.
Implementors beware that this endpoint creates producers and consumers which do not allow full control of their lifecycle asService
orSuspendableService
would do. If your producers/consumers need more control over their lifecycle it is advised instead to extendDefaultEndpoint
,DefaultProducer
andDefaultConsumer
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProcessorEndpoint()
ProcessorEndpoint(String endpointUri, org.apache.camel.CamelContext context, org.apache.camel.Processor processor)
protected
ProcessorEndpoint(String endpointUri, org.apache.camel.Component component)
ProcessorEndpoint(String endpointUri, org.apache.camel.Component component, org.apache.camel.Processor processor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.PollingConsumer
createPollingConsumer()
protected org.apache.camel.Processor
createProcessor()
org.apache.camel.Producer
createProducer()
org.apache.camel.Processor
getProcessor()
protected void
onExchange(org.apache.camel.Exchange exchange)
void
setProcessor(org.apache.camel.Processor processor)
-
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
configureExchange, configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, doInit, 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
-
-
-
-
Constructor Detail
-
ProcessorEndpoint
protected ProcessorEndpoint()
-
ProcessorEndpoint
public ProcessorEndpoint(String endpointUri, org.apache.camel.CamelContext context, org.apache.camel.Processor processor)
-
ProcessorEndpoint
public ProcessorEndpoint(String endpointUri, org.apache.camel.Component component, org.apache.camel.Processor processor)
-
ProcessorEndpoint
protected ProcessorEndpoint(String endpointUri, org.apache.camel.Component component)
-
-
Method Detail
-
createPollingConsumer
public org.apache.camel.PollingConsumer createPollingConsumer() throws Exception
- Specified by:
createPollingConsumer
in interfaceorg.apache.camel.Endpoint
- Overrides:
createPollingConsumer
in classDefaultEndpoint
- Throws:
Exception
-
setProcessor
public void setProcessor(org.apache.camel.Processor processor)
-
createProcessor
protected org.apache.camel.Processor createProcessor() throws Exception
- Throws:
Exception
-
-