|
||||||||||
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()
|
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, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend |
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 Object
public Endpoint getEndpoint()
Consumer
Consumer
consumes from.
getEndpoint
in interface Consumer
public ExceptionHandler getExceptionHandler()
public void setExceptionHandler(ExceptionHandler exceptionHandler)
public Processor getProcessor()
public boolean deferShutdown(ShutdownRunningTask shutdownRunningTask)
ShutdownAware
SedaConsumer
.
deferShutdown
in interface ShutdownAware
shutdownRunningTask
- the configured option for how to act when shutting down running tasks.
public int getPendingExchangesSize()
ShutdownAware
Exchange
which are pending.
For example the SedaConsumer
.
Return zero to indicate no pending exchanges and therefore ready to shutdown.
getPendingExchangesSize
in interface ShutdownAware
public 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 void doStart() throws Exception
doStart
in class ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class ServiceSupport
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |