edu.luc.cs.trull.swing
Class FastSwingScheduler
java.lang.Object
edu.luc.cs.trull.swing.FastSwingScheduler
- All Implemented Interfaces:
- Scheduler
- Direct Known Subclasses:
- SwingScheduler
public class FastSwingScheduler
- extends java.lang.Object
- implements Scheduler
An implementation of the Scheduler interface based on the
Java Swing event dispatch thread. To allow for faster execution, it does not
support the await method.
This Scheduler implementation guarantees
that the application satisfies the Swing single-thread rule
without explicit scheduling of tasks in the Swing event dispatch thread.
- See Also:
Scheduler,
SwingScheduler
|
Field Summary |
private static org.apache.log4j.Logger |
logger
|
|
Method Summary |
void |
await()
This method is not supported in the interest of faster execution. |
void |
execute(java.lang.Runnable task)
This method executes a Runnable and waits for its completion. |
void |
schedule(java.lang.Runnable task)
This method schedules a Runnable for later execution. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final org.apache.log4j.Logger logger
FastSwingScheduler
public FastSwingScheduler()
await
public void await()
throws java.lang.InterruptedException
- This method is not supported in the interest of faster execution.
- Specified by:
await in interface Scheduler
- Throws:
java.lang.InterruptedException - if the current thread is interrupted while waiting.
execute
public void execute(java.lang.Runnable task)
throws java.lang.InterruptedException
- Description copied from interface:
Scheduler
- This method executes a Runnable and waits for its completion.
- Specified by:
execute in interface Scheduler
- Parameters:
task - the Runnable to be executed.
- Throws:
java.lang.InterruptedException - if the current thread is interrupted while waiting.
schedule
public void schedule(java.lang.Runnable task)
- Description copied from interface:
Scheduler
- This method schedules a Runnable for later execution.
- Specified by:
schedule in interface Scheduler
- Parameters:
task - the Runnable to be scheduled.
http://www.cs.luc.edu/trull/