org.jasig.portal.utils
Class ThreadPoolReceipt

java.lang.Object
  extended by org.jasig.portal.utils.ThreadPoolReceipt

public class ThreadPoolReceipt
extends Object

A receipt that provides some information/control about a job that's being processed on the ThreadPool

Author:
Peter Kharchenko pkharchenko@interactivebusiness.com

Field Summary
protected  boolean jobdone
           
protected  boolean jobsuccessful
           
protected  Throwable thrownException
           
protected  ThreadPoolWorker worker
           
 
Constructor Summary
ThreadPoolReceipt(ThreadPoolWorker w)
           
 
Method Summary
 Throwable getThrownException()
           
 boolean isJobdone()
           
 boolean isJobsuccessful()
           
 void killJob()
          Signals to the thread that it should abandon all hopes and kill the job as soon as possible.
 void releaseWorker()
           
 String toString()
           
 void updateStatus(ThreadPoolWorker currentWorker, boolean isdone, boolean issuccessful, Throwable ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

worker

protected ThreadPoolWorker worker

jobdone

protected boolean jobdone

jobsuccessful

protected boolean jobsuccessful

thrownException

protected Throwable thrownException
Constructor Detail

ThreadPoolReceipt

public ThreadPoolReceipt(ThreadPoolWorker w)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

updateStatus

public void updateStatus(ThreadPoolWorker currentWorker,
                         boolean isdone,
                         boolean issuccessful,
                         Throwable ex)

killJob

public void killJob()
Signals to the thread that it should abandon all hopes and kill the job as soon as possible.


releaseWorker

public void releaseWorker()

getThrownException

public Throwable getThrownException()

isJobsuccessful

public boolean isJobsuccessful()

isJobdone

public boolean isJobdone()


Copyright © 2010 Jasig. All Rights Reserved.