edu.hawaii.ics.yucheng
Class BackgroundWorker.Delegate

java.lang.Object
  extended by edu.hawaii.ics.yucheng.BackgroundWorker.Delegate
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
BackgroundWorker<TResult,TProgress>

final class BackgroundWorker.Delegate
extends java.lang.Object
implements java.lang.Runnable

A delegate class used to transfer messages between the GUI thread and the background worker thread.


Field Summary
(package private)  int action
          The action to perform.
(package private)  java.lang.Exception error
          The error data.
(package private)  TProgress progress
          The progress data.
(package private)  TResult result
          The result data.
 
Constructor Summary
BackgroundWorker.Delegate(int action, TProgress progress, TResult result, java.lang.Exception error)
          Initializes a new instance of the class.
 
Method Summary
 void run()
          The entry point for the delegate's execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

action

final int action
The action to perform.


error

final java.lang.Exception error
The error data.


progress

final TProgress progress
The progress data.


result

final TResult result
The result data.

Constructor Detail

BackgroundWorker.Delegate

public BackgroundWorker.Delegate(int action,
                                 TProgress progress,
                                 TResult result,
                                 java.lang.Exception error)
Initializes a new instance of the class.

Parameters:
action - The action to perform.
progress - The progress data (optional).
result - The result data (optional).
error - The error data (optional).
Method Detail

run

public void run()
The entry point for the delegate's execution. This executes in either the GUI thread or the background worker thread depending on the type of action that should be performed.

Specified by:
run in interface java.lang.Runnable