public class SimEventRedispatcher extends BasicSimEntity
| Modifier and Type | Field and Description |
|---|---|
private BasicSimEntity |
source
The
|
eventList, propertyDEFAULT_ENTITY_NAME, DEFAULT_EVENT_NAME, DEFAULT_PRIORITY, EVENT_METHOD_PREFIX, NL| Constructor and Description |
|---|
SimEventRedispatcher()
Sets this instance to be non-persistent
|
SimEventRedispatcher(BasicSimEntity source) |
| Modifier and Type | Method and Description |
|---|---|
BasicSimEntity |
getSource() |
void |
handleSimEvent(SimEvent event)
Does nothing, since this only responds to events that are heard.
|
void |
processSimEvent(SimEvent event)
Creates a copy of the SimEvent and dispatches it to the SimEventListeners
of the source instance.
|
void |
setSource(BasicSimEntity source)
If source had previously been set, remove this as a SimEventListener and
remove all the source's as SimEventListener to this instance.
|
addPropertyChangeListener, addPropertyChangeListener, attemptSchedule, clearAddedProperty, compareTo, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAddedProperties, getEventList, getEventListID, getName, getPriority, getPropertiesString, getProperty, getProperty, getPropertyChangeListeners, getSerial, interrupt, interrupt, interruptAll, interruptAll, interruptAll, interruptAllWithArgs, interruptAllWithArgs, isClearAddedPropertiesOnReset, isJustDefinedProperties, isPersistant, isReRunnable, isVerbose, parametersMatch, removePropertyChangeListener, removePropertyChangeListener, reset, resetNextSerial, setClearAddedPropertiesOnReset, setEventList, setEventListID, setJustDefinedProperties, setName, setPersistant, setPriority, setProperty, setVerbose, toString, waitDelay, waitDelay, waitDelay, waitDelayaddSimEventListener, getSimEventListeners, notifyListeners, removeSimEventListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddSimEventListener, getSimEventListeners, notifyListeners, removeSimEventListenerprivate BasicSimEntity source
public SimEventRedispatcher()
public SimEventRedispatcher(BasicSimEntity source)
source - Given source of "heard" events.public void handleSimEvent(SimEvent event)
handleSimEvent in interface SimEventSchedulerhandleSimEvent in class BasicSimEntityevent - Given SimEventpublic void processSimEvent(SimEvent event)
processSimEvent in interface SimEventListenerprocessSimEvent in class BasicSimEntityevent - Given SimEventpublic BasicSimEntity getSource()
public void setSource(BasicSimEntity source)
Then add this as a listener to the new source and the new source's SimEventListeners as SimEventListsners to this. the listeners of the new source that are also SimEventSources
source - the source to set