|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimulation_Lab06Version.Observee
public class Observee
This class encapsulates services for launching a new thread and for starting a process on that thread that dispatches events at the specified rate. Objects of this type can support a single observer (additional observers cannot be installed).
Constructor Summary | |
---|---|
Observee(int numberEventsToBeDispatchedPerSecond,
ActionListener theObserver)
Instantiates an object that dispatches events and that can be observed (an observee). |
Method Summary | |
---|---|
boolean |
isRunning()
Determines whether this Observee is currently running and dispatching events. |
void |
start()
Launches the thread. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Observee(int numberEventsToBeDispatchedPerSecond, ActionListener theObserver)
numberEventsToBeDispatchedPerSecond
- an int that is strictly greater than zero, representing the
number of events to be dispatched per secondtheObserver
- the object that will be listening for the events dispatched by
this objectMethod Detail |
---|
public void start()
public boolean isRunning()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |