|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.openbandy.event.EventSource org.openbandy.example.test.EventSourceSimulation
public class EventSourceSimulation
An example EventSource that dispatches a number of test events every 500 milliseconds.
(c) Copyright Philipp Bolliger 2007, ALL RIGHTS RESERVED.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
EventSourceSimulation(AllEventsSentMonitor monitor,
EventSourceOwner owner,
int numberOfEventsToSimulate)
|
Method Summary | |
---|---|
java.util.Vector |
getProvidedEventTypes()
While registering at the EventService, the latter will request the EventSource to state the types of Events it will delegate. |
EventSource |
newlyInstantiate()
As the EventService must eventually create new instances of an EventSource in order to restart it, an EventSource must provide this method which must create (and return) a new instance and subsequently reset its reference in the class owning it. |
void |
run()
Starts the EventSource. |
void |
stopEventSource()
Stops the source. |
void |
stopEventSource(java.lang.String eventShortClassName)
Advises the EventSource, that events of type eventShortClassName will no longer
be conumsed. |
Methods inherited from class org.openbandy.event.EventSource |
---|
isRunning, startEventSource |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventSourceSimulation(AllEventsSentMonitor monitor, EventSourceOwner owner, int numberOfEventsToSimulate)
Method Detail |
---|
public java.util.Vector getProvidedEventTypes()
EventSource
getProvidedEventTypes
in class EventSource
public EventSource newlyInstantiate()
EventSource
newlyInstantiate
in class EventSource
public void run()
EventSource
run
in interface java.lang.Runnable
run
in class EventSource
public void stopEventSource(java.lang.String eventShortClassName)
EventSource
eventShortClassName
will no longer
be conumsed.
If non of the provided event types is consumed,
stop the event source thread.
stopEventSource
in class EventSource
public void stopEventSource()
EventSource
stopEventSource
in class EventSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |