|
TaskBean API 0.5 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectglogic.jthin.app.JThinWorker
Manages thread that is invoked by GUI code to process both the remote call and then process the reply and consume the results into the GUI. Normally all remote requests should use this class to handle both the remote processing and how the application is suspended during the remote processing. During remote processing the ControlBar will display corresponding status messages and status. An hour glass will prevent the user from performing mouse/key events until the remote request has returned or the user has "Stop" the remote processing.
| Field Summary | |
static int |
COMPLETED
|
static int |
DISPLAY_FAILURE
|
static int |
PROCESSING
|
static int |
REMOTE_FAILURE
|
| Constructor Summary | |
JThinWorker(JThinFrame frame,
java.lang.String stOperationName)
Perform a remote server call and then update the gui once the remove call has returned. |
|
| Method Summary | |
long |
getCompletedTime()
|
java.lang.Throwable |
getException()
|
JThinFrame |
getJThinFrame()
|
java.lang.Object |
getLogicOpResult()
Return the value created by the remoteOperation method. |
java.lang.String |
getOperationName()
|
int |
getRequestStatus()
|
long |
getScreenID()
|
long |
getStartTime()
|
long |
getStopRequestTime()
|
protected java.lang.Object |
getValue()
Get the value produced by the worker thread, or null if it hasn't been constructed yet. |
void |
guiOperation()
Called on the event dispatching thread (not on the worker thread) after the remoteOperation method has returned. |
void |
interrupt()
A new method that interrupts the worker thread. |
boolean |
isStopRequested()
|
abstract java.lang.Object |
remoteOperation()
Compute the value to be returned by the get method.
|
void |
start()
Start the worker thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PROCESSING
public static final int COMPLETED
public static final int REMOTE_FAILURE
public static final int DISPLAY_FAILURE
| Constructor Detail |
public JThinWorker(JThinFrame frame,
java.lang.String stOperationName)
frame - Description of the Parameter| Method Detail |
protected java.lang.Object getValue()
public abstract java.lang.Object remoteOperation()
throws WServiceAccessException,
ClientInvokeException
get method.
Every remote operation can throw the declared exceptions shown here.
Normally these exceptions will be handled by the JThinWorker exception
handling logic. If either one of these exceptions occur (or an uncaught
RuntimeExcpetion or Error exception) then the guiOperation()
method will not be called.
The implementor of this method should NOT catch these exceptions.
In rare cases you can catch these exceptions if you
need display specific error or status information but normally
you should not, and if you do you should rethrow them. If the
implentation of this method can throw additional exceptions they should
be caught within the implementation and passed to the guiOperation()
method as necessary.
WServiceAccessException
ClientInvokeExceptionpublic void guiOperation()
remoteOperation method has returned. If the remote
call throws additional execptions that are caught in the body of the
remoteOperation method then those exceptions should be
checked for at the begining of the this method and rethrown as necessary.
Note, if the user manaully stops thre request or their is a failure in the
remoteOperation method (WServiceAccessException or ClientInvokeException)
then this method will not be called but instead an error message displayed
in the control bar.
public void interrupt()
public java.lang.Object getLogicOpResult()
remoteOperation method. Returns
null if either the constructing thread or the current thread was
interrupted before a value was produced.
remoteOperation methodpublic void start()
public final long getScreenID()
public final java.lang.String getOperationName()
public final JThinFrame getJThinFrame()
public final java.lang.Throwable getException()
public final int getRequestStatus()
public final long getStartTime()
public final long getCompletedTime()
public final long getStopRequestTime()
public final boolean isStopRequested()
|
TaskBean API 0.5 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||