|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.component.seda.SedaConsumer
public class SedaConsumer
A Consumer for the SEDA component.
| Constructor Summary | |
|---|---|
SedaConsumer(SedaEndpoint endpoint,
Processor processor)
|
|
| Method Summary | |
|---|---|
boolean |
deferShutdown(ShutdownRunningTask shutdownRunningTask)
To defer shutdown during first phase of shutdown. |
protected void |
doStart()
|
protected void |
doStop()
|
Endpoint |
getEndpoint()
Gets the endpoint this Consumer consumes from. |
ExceptionHandler |
getExceptionHandler()
|
protected Processor |
getMulticastProcessor()
|
int |
getPendingExchangesSize()
Gets the number of pending exchanges. |
Processor |
getProcessor()
|
void |
run()
|
protected void |
sendToConsumers(Exchange exchange)
Send the given Exchange to the consumer(s). |
void |
setExceptionHandler(ExceptionHandler exceptionHandler)
|
String |
toString()
|
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
|---|
addChildService, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.camel.Service |
|---|
start, stop |
| Constructor Detail |
|---|
public SedaConsumer(SedaEndpoint endpoint,
Processor processor)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic Endpoint getEndpoint()
ConsumerConsumer consumes from.
getEndpoint in interface Consumerpublic ExceptionHandler getExceptionHandler()
public void setExceptionHandler(ExceptionHandler exceptionHandler)
public Processor getProcessor()
public boolean deferShutdown(ShutdownRunningTask shutdownRunningTask)
ShutdownAwareSedaConsumer.
deferShutdown in interface ShutdownAwareshutdownRunningTask - the configured option for how to act when shutting down running tasks.
public int getPendingExchangesSize()
ShutdownAwareExchange which are pending.
For example the SedaConsumer.
Return zero to indicate no pending exchanges and therefore ready to shutdown.
getPendingExchangesSize in interface ShutdownAwarepublic void run()
run in interface Runnable
protected void sendToConsumers(Exchange exchange)
throws Exception
Exchange to the consumer(s).
If multiple consumers then they will each receive a copy of the Exchange.
A multicast processor will send the exchange in parallel to the multiple consumers.
If there is only a single consumer then its dispatched directly to it using same thread.
exchange - the exchange
Exception - can be thrown if processing of the exchange failedprotected Processor getMulticastProcessor()
protected void doStart()
throws Exception
doStart in class ServiceSupportException
protected void doStop()
throws Exception
doStop in class ServiceSupportException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||