Methods Summary |
---|
public abstract void | doWork()This method is executed by thread pool as the basic work operation.
|
protected void | execute()Execute the work. If current thread should be used,
doWork is called directly. Otherwise, work is submitted
to the thread pool.
if (getUseCurrentThread()) {
doWork();
} else {
getWorkManager().submitWork(this);
}
|
public javax.jbi.messaging.DeliveryChannel | getDeliveryChannel()Retrieves the delivery channel object.
return this.channel;
|
public long | getEnqueueTime()Retrieves the time at which this work is enqueued
return nqTime;
|
public java.lang.Exception | getException()Get the exception, if any produced while executng
this work.
return this.exception;
|
public javax.jbi.messaging.MessageExchange | getMessageExchange()Retrieves the MEP.
return me;
|
public java.lang.String | getName()Retrieves the name of the work.
return "One JBI Work";
|
public boolean | getUseCurrentThread()Retrieves the flag indicating whether the current thread should
be used for work execution or not.
return this.useCurrentThread;
|
public WorkManager | getWorkManager()Retrieves the work manager instance.
return this.wm;
|
public void | setEnqueueTime(long tme)Time at which this work is enqueued.
this.nqTime = tme;
|
public void | setException(java.lang.Exception ex)Convenience method to set the execption object
produced while executing the work.
this.exception = ex;
|
public void | setMessageExchange(javax.jbi.messaging.MessageExchange me)Set the MEP associated with this piece of work.
this.me = me;
|
public void | setUseCurrentThread(boolean flag)Set a boolean indicating whether current thread should be used
for execution of this work.
this.useCurrentThread = flag;
|