|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.component.seda.SedaEndpoint
@ManagedResource(description="Managed SedaEndpoint")
@UriEndpoint(scheme="seda",
consumerClass=SedaConsumer.class)
public class SedaEndpoint
An implementation of the Queue components for
asynchronous SEDA exchanges on a BlockingQueue within a CamelContext
| Field Summary |
|---|
| Fields inherited from class org.apache.camel.support.ServiceSupport |
|---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
| Constructor Summary | |
|---|---|
SedaEndpoint()
|
|
SedaEndpoint(String endpointUri,
Component component,
BlockingQueue<Exchange> queue)
|
|
SedaEndpoint(String endpointUri,
Component component,
BlockingQueue<Exchange> queue,
int concurrentConsumers)
|
|
SedaEndpoint(String endpointUri,
Component component,
BlockingQueueFactory<Exchange> queueFactory,
int concurrentConsumers)
|
|
| Method Summary | |
|---|---|
String |
browseAllMessagesAsXml(Boolean includeBody)
|
String |
browseExchange(Integer index)
|
String |
browseMessageAsXml(Integer index,
Boolean includeBody)
|
String |
browseMessageBody(Integer index)
|
String |
browseRangeMessagesAsXml(Integer fromIndex,
Integer toIndex,
Boolean includeBody)
|
Consumer |
createConsumer(Processor processor)
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor |
PollingConsumer |
createPollingConsumer()
Creates a new Polling Consumer so that the caller can poll message exchanges from the consumer using PollingConsumer.receive(),
PollingConsumer.receiveNoWait() or
PollingConsumer.receive(long) whenever it is ready to do so
rather than using the Event
Based Consumer returned by Endpoint.createConsumer(Processor) |
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint |
protected BlockingQueue<Exchange> |
createQueue()
|
protected void |
doShutdown()
Implementations override this method to perform customized shutdown. |
protected void |
doStart()
Implementations override this method to support customized start/stop. |
String |
getCamelId()
|
String |
getCamelManagementName()
|
SedaComponent |
getComponent()
Returns the component that created this endpoint. |
int |
getConcurrentConsumers()
|
protected MulticastProcessor |
getConsumerMulticastProcessor()
|
Set<SedaConsumer> |
getConsumers()
Returns the current active consumers on this endpoint |
int |
getCurrentQueueSize()
|
String |
getEndpointUri()
Returns the string representation of the endpoint URI |
List<Exchange> |
getExchanges()
Returns the current pending exchanges |
int |
getPollTimeout()
|
Set<SedaProducer> |
getProducers()
Returns the current active producers on this endpoint |
BlockingQueue<Exchange> |
getQueue()
|
QueueReference |
getQueueReference()
Get's the QueueReference for the this endpoint. |
int |
getSize()
|
String |
getState()
|
long |
getTimeout()
|
WaitForTaskToComplete |
getWaitForTaskToComplete()
|
boolean |
hasConsumers()
|
boolean |
isBlockWhenFull()
|
boolean |
isFailIfNoConsumers()
|
boolean |
isMultipleConsumers()
|
boolean |
isMultipleConsumersSupported()
Are multiple consumers supported? |
boolean |
isPurgeWhenStopping()
|
boolean |
isSingleton()
Whether this class supports being singleton or not. |
void |
purgeQueue()
Purges the queue |
long |
queueSize()
|
void |
setBlockWhenFull(boolean blockWhenFull)
|
void |
setConcurrentConsumers(int concurrentConsumers)
|
void |
setFailIfNoConsumers(boolean failIfNoConsumers)
|
void |
setMultipleConsumers(boolean multipleConsumers)
|
void |
setPollTimeout(int pollTimeout)
|
void |
setPurgeWhenStopping(boolean purgeWhenStopping)
|
void |
setQueue(BlockingQueue<Exchange> queue)
|
void |
setSize(int size)
|
void |
setTimeout(long timeout)
|
void |
setWaitForTaskToComplete(WaitForTaskToComplete waitForTaskToComplete)
|
void |
shutdown()
Shutdown the service, which means it cannot be started again. |
void |
stop()
Stops the service |
protected void |
updateMulticastProcessor()
|
| Methods inherited from class org.apache.camel.support.ServiceSupport |
|---|
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, 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 |
|---|
configureProperties, createExchange, createExchange, createExchange, getCamelContext, getEndpointConfiguration, getEndpointKey, isLenientProperties, setCamelContext |
| Methods inherited from interface org.apache.camel.Service |
|---|
start |
| Constructor Detail |
|---|
public SedaEndpoint()
public SedaEndpoint(String endpointUri,
Component component,
BlockingQueue<Exchange> queue)
public SedaEndpoint(String endpointUri,
Component component,
BlockingQueue<Exchange> queue,
int concurrentConsumers)
public SedaEndpoint(String endpointUri,
Component component,
BlockingQueueFactory<Exchange> queueFactory,
int concurrentConsumers)
| Method Detail |
|---|
public SedaComponent getComponent()
DefaultEndpoint
getComponent in class DefaultEndpoint
public Producer createProducer()
throws Exception
Endpoint
createProducer in interface EndpointException - can be thrown
public Consumer createConsumer(Processor processor)
throws Exception
Endpoint
createConsumer in interface Endpointprocessor - the given processor
Exception - can be thrown
public PollingConsumer createPollingConsumer()
throws Exception
EndpointPollingConsumer.receive(),
PollingConsumer.receiveNoWait() or
PollingConsumer.receive(long) whenever it is ready to do so
rather than using the Event
Based Consumer returned by Endpoint.createConsumer(Processor)
createPollingConsumer in interface EndpointcreatePollingConsumer in class DefaultEndpointException - if the pull consumer could not be createdpublic BlockingQueue<Exchange> getQueue()
protected BlockingQueue<Exchange> createQueue()
public QueueReference getQueueReference()
QueueReference for the this endpoint.
protected MulticastProcessor getConsumerMulticastProcessor()
throws Exception
Exception
protected void updateMulticastProcessor()
throws Exception
Exceptionpublic void setQueue(BlockingQueue<Exchange> queue)
@ManagedAttribute(description="Queue max capacity") public int getSize()
public void setSize(int size)
@ManagedAttribute(description="Current queue size") public int getCurrentQueueSize()
public void setBlockWhenFull(boolean blockWhenFull)
@ManagedAttribute(description="Whether the caller will block sending to a full queue") public boolean isBlockWhenFull()
public void setConcurrentConsumers(int concurrentConsumers)
@ManagedAttribute(description="Number of concurrent consumers") public int getConcurrentConsumers()
public WaitForTaskToComplete getWaitForTaskToComplete()
public void setWaitForTaskToComplete(WaitForTaskToComplete waitForTaskToComplete)
@ManagedAttribute public long getTimeout()
public void setTimeout(long timeout)
@ManagedAttribute public boolean isFailIfNoConsumers()
public void setFailIfNoConsumers(boolean failIfNoConsumers)
@ManagedAttribute public boolean isMultipleConsumers()
public void setMultipleConsumers(boolean multipleConsumers)
@ManagedAttribute public int getPollTimeout()
public void setPollTimeout(int pollTimeout)
@ManagedAttribute public boolean isPurgeWhenStopping()
public void setPurgeWhenStopping(boolean purgeWhenStopping)
@ManagedAttribute(description="Singleton") public boolean isSingleton()
IsSingleton
isSingleton in interface IsSingletonpublic List<Exchange> getExchanges()
getExchanges in interface BrowsableEndpoint@ManagedAttribute public boolean isMultipleConsumersSupported()
MultipleConsumersSupport
isMultipleConsumersSupported in interface MultipleConsumersSupport@ManagedOperation(description="Purges the seda queue") public void purgeQueue()
public Set<SedaConsumer> getConsumers()
public Set<SedaProducer> getProducers()
@ManagedOperation(description="Current number of Exchanges in Queue") public long queueSize()
@ManagedOperation(description="Get Exchange from queue by index") public String browseExchange(Integer index)
@ManagedOperation(description="Get message body from queue by index") public String browseMessageBody(Integer index)
@ManagedOperation(description="Get message as XML from queue by index")
public String browseMessageAsXml(Integer index,
Boolean includeBody)
@ManagedOperation(description="Gets all the messages as XML from the queue") public String browseAllMessagesAsXml(Boolean includeBody)
@ManagedOperation(description="Gets the range of messages as XML from the queue")
public String browseRangeMessagesAsXml(Integer fromIndex,
Integer toIndex,
Boolean includeBody)
@ManagedAttribute(description="Camel context ID") public String getCamelId()
@ManagedAttribute(description="Camel ManagementName") public String getCamelManagementName()
@ManagedAttribute(description="Endpoint URI",
mask=true)
public String getEndpointUri()
Endpoint
getEndpointUri in interface EndpointgetEndpointUri in class DefaultEndpoint@ManagedAttribute(description="Endpoint service state") public String getState()
public boolean hasConsumers()
protected void doStart()
throws Exception
ServiceSupportServiceSupport.doStop() for more details.
doStart in class DefaultEndpointExceptionServiceSupport.doStop()
public void stop()
throws Exception
Service
stop in interface Servicestop in class ServiceSupportException - is thrown if stopping failed
public void shutdown()
throws Exception
ShutdownableService
shutdown in interface ShutdownableServiceshutdown in class ServiceSupportException - thrown if shutting down failed
protected void doShutdown()
throws Exception
ServiceSupport
doShutdown in class ServiceSupportException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||