Trull

edu.luc.cs.trull
Interface ComponentScheduler

All Superinterfaces:
Scheduler
All Known Implementing Classes:
ComponentSchedulerAdapter

public interface ComponentScheduler
extends Scheduler

An abstraction of the capability to execute and control a component in the proper thread.


Method Summary
 void await()
          This method waits for the runner to finish processing all pending requests.
 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 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 interface edu.luc.cs.trull.Scheduler
execute, schedule
 

Method Detail

await

void await()
           throws java.lang.InterruptedException
This method waits for the runner to finish processing all pending requests. This capability is important for avoiding race conditions.

Specified by:
await in interface Scheduler
Throws:
java.lang.InterruptedException - if the current thread is interrupted before or while waiting.

propertyChange

void propertyChange(Component c,
                    java.beans.PropertyChangeEvent event)
                    throws java.lang.InterruptedException
This method sends an event to the component and waits until the component has processed the event.

Parameters:
c - the component that will receive the event.
event - the event sent to the component.
Throws:
java.lang.InterruptedException

resume

void resume(Component c)
            throws java.lang.InterruptedException
This method resumes a component and waits until the component has resumed.

Parameters:
c - the component to be resumed.
Throws:
java.lang.InterruptedException

start

void start(Component c)
           throws java.lang.InterruptedException
This method starts a component and waits until the component is ready.

Parameters:
c - the component to be started.
Throws:
java.lang.InterruptedException

start

void start(Component c,
           java.beans.PropertyChangeEvent event)
           throws java.lang.InterruptedException
This method starts a component with the given event and waits until the component is ready.

Parameters:
c - the component to be started.
event - the event to be sent to the component.
Throws:
java.lang.InterruptedException

stop

void stop(Component c)
          throws java.lang.InterruptedException
This method stops a component and waits until the component has stopped.

Parameters:
c - the component to be stopped.
Throws:
java.lang.InterruptedException

suspend

void suspend(Component c)
             throws java.lang.InterruptedException
This method suspends a component and waits until the component has suspended.

Parameters:
c - the component to be suspended.
Throws:
java.lang.InterruptedException

Trull

http://www.cs.luc.edu/trull/