|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.luc.cs.trull.ComponentSchedulerAdapter
public class ComponentSchedulerAdapter
An adapter for using any Scheduler as a ComponentScheduler.
ComponentScheduler,
Scheduler| Field Summary | |
|---|---|
private static org.apache.log4j.Logger |
logger
|
private Scheduler |
scheduler
The original scheduler instance. |
| Constructor Summary | |
|---|---|
ComponentSchedulerAdapter(Scheduler scheduler)
|
|
| Method Summary | |
|---|---|
void |
await()
This method waits for the runner to finish processing all pending requests. |
void |
execute(java.lang.Runnable r)
This method executes a Runnable and waits for its completion. |
void |
propertyChange(Component c,
java.beans.PropertyChangeEvent event)
This method sends an event to the component and waits until the component has processed the event. |
void |
resume(Component c)
This method resumes a component and waits until the component has resumed. |
void |
schedule(java.lang.Runnable r)
This method schedules a Runnable for later execution. |
void |
start(Component c)
This method starts a component and waits until the component is ready. |
void |
start(Component c,
java.beans.PropertyChangeEvent event)
This method starts a component with the given event and waits until the component is ready. |
void |
stop(Component c)
This method stops a component and waits until the component has stopped. |
void |
suspend(Component c)
This method suspends a component and waits until the component has suspended. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.apache.log4j.Logger logger
private Scheduler scheduler
| Constructor Detail |
|---|
public ComponentSchedulerAdapter(Scheduler scheduler)
| Method Detail |
|---|
public void await()
throws java.lang.InterruptedException
ComponentScheduler
await in interface ComponentSchedulerawait in interface Schedulerjava.lang.InterruptedException - if the current thread is interrupted
before or while waiting.
public void execute(java.lang.Runnable r)
throws java.lang.InterruptedException
Scheduler
execute in interface Schedulerr - the Runnable to be executed.
java.lang.InterruptedException - if the current thread is interrupted while waiting.
public void propertyChange(Component c,
java.beans.PropertyChangeEvent event)
throws java.lang.InterruptedException
ComponentScheduler
propertyChange in interface ComponentSchedulerc - the component that will receive the event.event - the event sent to the component.
java.lang.InterruptedException
public void resume(Component c)
throws java.lang.InterruptedException
ComponentScheduler
resume in interface ComponentSchedulerc - the component to be resumed.
java.lang.InterruptedExceptionpublic void schedule(java.lang.Runnable r)
Scheduler
schedule in interface Schedulerr - the Runnable to be scheduled.
public void start(Component c)
throws java.lang.InterruptedException
ComponentScheduler
start in interface ComponentSchedulerc - the component to be started.
java.lang.InterruptedException
public void start(Component c,
java.beans.PropertyChangeEvent event)
throws java.lang.InterruptedException
ComponentScheduler
start in interface ComponentSchedulerc - the component to be started.event - the event to be sent to the component.
java.lang.InterruptedException
public void stop(Component c)
throws java.lang.InterruptedException
ComponentScheduler
stop in interface ComponentSchedulerc - the component to be stopped.
java.lang.InterruptedException
public void suspend(Component c)
throws java.lang.InterruptedException
ComponentScheduler
suspend in interface ComponentSchedulerc - the component to be suspended.
java.lang.InterruptedException
|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||