|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.processor.ThreadProcessor
public class ThreadProcessor
A processor that forces async processing of the exchange using a thread pool.
Constructor Summary | |
---|---|
ThreadProcessor()
|
Method Summary | |
---|---|
int |
getCoreSize()
|
ThreadPoolExecutor |
getExecutor()
|
long |
getKeepAliveTime()
|
int |
getMaxSize()
|
String |
getName()
|
int |
getPriority()
|
long |
getStackSize()
|
BlockingQueue<Runnable> |
getTaskQueue()
|
ThreadGroup |
getThreadGroup()
|
boolean |
isCallerRunsWhenRejected()
|
boolean |
isDaemon()
|
void |
process(Exchange exchange)
Processes the message exchange |
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange. |
void |
setCallerRunsWhenRejected(boolean callerRunsWhenRejected)
|
void |
setCoreSize(int coreSize)
|
void |
setDaemon(boolean daemon)
|
void |
setExecutor(ThreadPoolExecutor executor)
|
void |
setKeepAliveTime(long keepAliveTime)
|
void |
setMaxSize(int maxSize)
|
void |
setName(String name)
|
void |
setPriority(int priority)
|
void |
setStackSize(long stackSize)
|
void |
setTaskQueue(BlockingQueue<Runnable> taskQueue)
|
void |
setThreadGroup(ThreadGroup threadGroup)
|
void |
start()
Starts the service |
void |
stop()
Stops the service |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadProcessor()
Method Detail |
---|
public void process(Exchange exchange) throws Exception
Processor
process
in interface Processor
Exception
- if an internal processing error has occurred.public boolean process(Exchange exchange, AsyncCallback callback)
AsyncProcessor
Processor.process(org.apache.camel.Exchange)
, but
the caller supports having the exchange asynchronously processed.
process
in interface AsyncProcessor
exchange
- the Exchange
to processcallback
- the AsyncCallback
will be invoked when the processing
of the exchange is completed. If the exchange is completed synchronously, then the
callback is also invoked synchronously. The callback should therefore be careful of
starting recursive loop.
public void start() throws Exception
Service
start
in interface Service
Exception
public void stop() throws Exception
Service
stop
in interface Service
Exception
public long getStackSize()
public void setStackSize(long stackSize)
public ThreadGroup getThreadGroup()
public void setThreadGroup(ThreadGroup threadGroup)
public int getPriority()
public void setPriority(int priority)
public boolean isDaemon()
public void setDaemon(boolean daemon)
public String getName()
public void setName(String name)
public long getKeepAliveTime()
public void setKeepAliveTime(long keepAliveTime)
public int getMaxSize()
public void setMaxSize(int maxSize)
public int getCoreSize()
public void setCoreSize(int coreSize)
public BlockingQueue<Runnable> getTaskQueue()
public void setTaskQueue(BlockingQueue<Runnable> taskQueue)
public ThreadPoolExecutor getExecutor()
public void setExecutor(ThreadPoolExecutor executor)
public boolean isCallerRunsWhenRejected()
public void setCallerRunsWhenRejected(boolean callerRunsWhenRejected)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |