Package org.apache.camel.component.stub
Class StubEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.component.seda.SedaEndpoint
-
- org.apache.camel.component.vm.VmEndpoint
-
- org.apache.camel.component.stub.StubEndpoint
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.AsyncEndpoint
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.MultipleConsumersSupport
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.BrowsableEndpoint
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.10.0", scheme="stub", title="Stub", syntax="stub:name", category={CORE,TESTING}) public class StubEndpoint extends org.apache.camel.component.vm.VmEndpoint
Stub out any physical endpoints while in development or testing. For example to run a route without needing to actually connect to a specific SMTP or HTTP endpoint. Just add stub: in front of any endpoint URI to stub out the endpoint. Internally the Stub component creates VM endpoints. The main difference between Stub and VM is that VM will validate the URI and parameters you give it, so putting vm: in front of a typical URI with query arguments will usually fail. Stub won't though, as it basically ignores all query parameters to let you quickly stub out one or more endpoints in your route temporarily.
-
-
Constructor Summary
Constructors Constructor Description StubEndpoint(String endpointUri, org.apache.camel.Component component, BlockingQueue<org.apache.camel.Exchange> queue)
StubEndpoint(String endpointUri, org.apache.camel.Component component, BlockingQueue<org.apache.camel.Exchange> queue, int concurrentConsumers)
StubEndpoint(String endpointUri, org.apache.camel.Component component, org.apache.camel.component.seda.BlockingQueueFactory<org.apache.camel.Exchange> queueFactory, int concurrentConsumers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StubConsumer
createNewConsumer(org.apache.camel.Processor processor)
org.apache.camel.Producer
createProducer()
-
Methods inherited from class org.apache.camel.component.seda.SedaEndpoint
createConsumer, createPollingConsumer, createQueue, doInit, doShutdown, doStart, getComponent, getConcurrentConsumers, getConsumerMulticastProcessor, getConsumers, getCurrentQueueSize, getExchanges, getOfferTimeout, getPollTimeout, getProducers, getQueue, getQueueReference, getSize, getTimeout, getWaitForTaskToComplete, hasConsumers, isBlockWhenFull, isDiscardIfNoConsumers, isDiscardWhenFull, isFailIfNoConsumers, isLimitConcurrentConsumers, isMultipleConsumers, isMultipleConsumersSupported, isPurgeWhenStopping, purgeQueue, setBlockWhenFull, setConcurrentConsumers, setDiscardIfNoConsumers, setDiscardWhenFull, setFailIfNoConsumers, setLimitConcurrentConsumers, setMultipleConsumers, setOfferTimeout, setPollTimeout, setPurgeWhenStopping, setQueue, setSize, setTimeout, setWaitForTaskToComplete, shutdown, stop, updateMulticastProcessor
-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, doStop, equals, getCamelContext, 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, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, start, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.camel.Endpoint
configureExchange, configureProperties, createAsyncProducer, createExchange, createExchange, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, isLenientProperties, isSingletonProducer, setCamelContext
-
-
-
-
Constructor Detail
-
StubEndpoint
public StubEndpoint(String endpointUri, org.apache.camel.Component component, BlockingQueue<org.apache.camel.Exchange> queue)
-
StubEndpoint
public StubEndpoint(String endpointUri, org.apache.camel.Component component, BlockingQueue<org.apache.camel.Exchange> queue, int concurrentConsumers)
-
StubEndpoint
public StubEndpoint(String endpointUri, org.apache.camel.Component component, org.apache.camel.component.seda.BlockingQueueFactory<org.apache.camel.Exchange> queueFactory, int concurrentConsumers)
-
-
Method Detail
-
createNewConsumer
protected StubConsumer createNewConsumer(org.apache.camel.Processor processor)
- Overrides:
createNewConsumer
in classorg.apache.camel.component.vm.VmEndpoint
-
-