|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jgap.event.EventManager
public class EventManager
Manages event notification in the system. Observers that desire to be notified of genetic events should subscribe to this class via the addEventListener() method. To unsubscribe, use the removeEventListener() method. To generate a genetic event, use the fireGeneticEvent() method, which will take care of notifying the appropriate subscribers.
| Constructor Summary | |
|---|---|
EventManager()
|
|
| Method Summary | |
|---|---|
void |
addEventListener(java.lang.String a_eventName,
GeneticEventListener a_eventListenerToAdd)
Adds a new listener that will be notified when the event represented by the given name is fired. |
java.lang.Object |
clone()
|
void |
fireGeneticEvent(GeneticEvent a_eventToFire)
Fires a genetic event. |
int |
hashCode()
|
void |
removeEventListener(java.lang.String a_eventName,
GeneticEventListener a_eventListenerToRemove)
Removes the given listener from subscription of the indicated event. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventManager()
| Method Detail |
|---|
public void addEventListener(java.lang.String a_eventName,
GeneticEventListener a_eventListenerToAdd)
addEventListener in interface IEventManagera_eventName - the name of the event to which the given listener
should be subscribed. Standard events are represented by constants in the
GeneticEvent classa_eventListenerToAdd - the genetic listener to subscribe to
notifications of the given event
public void removeEventListener(java.lang.String a_eventName,
GeneticEventListener a_eventListenerToRemove)
removeEventListener in interface IEventManagera_eventName - the name of the event to which the given listener
should be removed. Standard events are represented by constants in the
GeneticEvent classa_eventListenerToRemove - the genetic listener to unsubscribe from
notifications of the given eventpublic void fireGeneticEvent(GeneticEvent a_eventToFire)
fireGeneticEvent in interface IEventManagera_eventToFire - the representation of the genetic event to firepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
clone in interface ICloneableclone in class java.lang.Object
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||