public class SedaComponent extends UriEndpointComponent
BlockingQueue
within a CamelContextModifier and Type | Field and Description |
---|---|
protected int |
concurrentConsumers |
protected org.slf4j.Logger |
log |
protected int |
maxConcurrentConsumers |
protected int |
queueSize |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
SedaComponent() |
SedaComponent(Class<? extends Endpoint> endpointClass) |
Modifier and Type | Method and Description |
---|---|
protected SedaEndpoint |
createEndpoint(String endpointUri,
Component component,
BlockingQueue<Exchange> queue,
int concurrentConsumers) |
protected SedaEndpoint |
createEndpoint(String endpointUri,
Component component,
BlockingQueueFactory<Exchange> queueFactory,
int concurrentConsumers) |
protected Endpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters)
A factory method allowing derived components to create a new endpoint
from the given URI, remaining path and optional parameters
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
int |
getConcurrentConsumers() |
BlockingQueueFactory<Exchange> |
getDefaultQueueFactory() |
QueueReference |
getOrCreateQueue(SedaEndpoint endpoint,
Integer size)
Deprecated.
use
|
QueueReference |
getOrCreateQueue(SedaEndpoint endpoint,
Integer size,
Boolean multipleConsumers)
|
QueueReference |
getOrCreateQueue(SedaEndpoint endpoint,
Integer size,
Boolean multipleConsumers,
BlockingQueueFactory<Exchange> customQueueFactory) |
String |
getQueueKey(String uri) |
QueueReference |
getQueueReference(String key) |
Map<String,QueueReference> |
getQueues() |
int |
getQueueSize() |
QueueReference |
registerQueue(SedaEndpoint endpoint,
BlockingQueue<Exchange> queue) |
void |
setConcurrentConsumers(int size)
Sets the default number of concurrent threads processing exchanges.
|
void |
setDefaultQueueFactory(BlockingQueueFactory<Exchange> defaultQueueFactory)
Sets the default queue factory.
|
void |
setQueueSize(int size)
Sets the default maximum capacity of the SEDA queue (i.e., the number of messages it can hold).
|
createComponentConfiguration, createParameterConfigurationMap, getEndpointClass, getParameterConfigurationMap, populateParameterConfigurationMap, setEndpointClass
afterConfiguration, createConfiguration, createEndpoint, doStart, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, preProcessUri, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
protected final org.slf4j.Logger log
protected final int maxConcurrentConsumers
protected int queueSize
protected int concurrentConsumers
public SedaComponent()
public SedaComponent(Class<? extends Endpoint> endpointClass)
public void setQueueSize(int size)
public int getQueueSize()
public void setConcurrentConsumers(int size)
public int getConcurrentConsumers()
public BlockingQueueFactory<Exchange> getDefaultQueueFactory()
public void setDefaultQueueFactory(BlockingQueueFactory<Exchange> defaultQueueFactory)
@Deprecated public QueueReference getOrCreateQueue(SedaEndpoint endpoint, Integer size)
@Deprecated public QueueReference getOrCreateQueue(SedaEndpoint endpoint, Integer size, Boolean multipleConsumers)
public QueueReference getOrCreateQueue(SedaEndpoint endpoint, Integer size, Boolean multipleConsumers, BlockingQueueFactory<Exchange> customQueueFactory)
public QueueReference registerQueue(SedaEndpoint endpoint, BlockingQueue<Exchange> queue)
public Map<String,QueueReference> getQueues()
public QueueReference getQueueReference(String key)
protected Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
DefaultComponent
createEndpoint
in class DefaultComponent
uri
- the full URI of the endpointremaining
- the remaining part of the URI without the query
parameters or component prefixparameters
- the optional parameters passed inException
- is thrown if error creating the endpointprotected SedaEndpoint createEndpoint(String endpointUri, Component component, BlockingQueueFactory<Exchange> queueFactory, int concurrentConsumers)
protected SedaEndpoint createEndpoint(String endpointUri, Component component, BlockingQueue<Exchange> queue, int concurrentConsumers)
public String getQueueKey(String uri)
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.doStop
in class DefaultComponent
Exception
ServiceSupport.doStart()
Apache Camel