public class NativeBasicSimEntity extends BasicSimEntity
An attmept to use NSS Objects driven by the Simkit engine. The idea is to use native methods to do the callbacks for processSimEvent() and handleSimEvent(). Since the state will typically be maintained outside Simkit, a native run() method is called for in order to perform whatever initializations are required.
The header file simkit_nss_NativeBasicSimEntity.h can be generated by the call
javah simkit.nss.NativeBasicSimEntity
from the command line, where the current working directory is one level
above the simkit folder.eventList, propertyDEFAULT_ENTITY_NAME, DEFAULT_EVENT_NAME, DEFAULT_PRIORITY, EVENT_METHOD_PREFIX, NL| Constructor and Description |
|---|
NativeBasicSimEntity() |
NativeBasicSimEntity(Priority priority) |
NativeBasicSimEntity(java.lang.String name) |
NativeBasicSimEntity(java.lang.String name,
Priority priority) |
| Modifier and Type | Method and Description |
|---|---|
void |
handleSimEvent(SimEvent simEvent)
This method is called from Schedule and will only
be passed SimEvents it had originally scheduled.
|
void |
processSimEvent(SimEvent simEvent)
This callback is received by listening to another SimEntity
|
void |
reset()
Perform whatever initializations are required.
|
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, 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, removeSimEventListenerpublic NativeBasicSimEntity()
public NativeBasicSimEntity(java.lang.String name)
name - The name of the NativeBasicSimEntity createdpublic NativeBasicSimEntity(Priority priority)
priority - The priority of the NativeBasicSimEntity instancepublic NativeBasicSimEntity(java.lang.String name,
Priority priority)
name - The name of the NativeBasicSimEntitypriority - The priority of the NativeBasicSimEntitypublic void reset()
reset in interface ReRunnablereset in class BasicSimEntitypublic void handleSimEvent(SimEvent simEvent)
handleSimEvent in interface SimEventSchedulerhandleSimEvent in class BasicSimEntitysimEvent - The SimEvent instance.public void processSimEvent(SimEvent simEvent)
processSimEvent in interface SimEventListenerprocessSimEvent in class BasicSimEntitysimEvent - The SimEvent being passed