|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.vm.api.jsvc.AbstractExternalService gov.nasa.arc.brahms.vm.api.jsvc.AbstractAsynchronousEventService
public abstract class AbstractAsynchronousEventService
The AbstractAsynchronousEventService is a base class for external services that want to handle the events generated by the virtual machine asynchronously. Any events send to this service are placed in a queue and will be handled in a separate thread of execution. Control is immediately returned to the virtual machine regardless of whether the event was handled.
AbstractExternalService
,
IExternalService
Constructor Summary | |
---|---|
AbstractAsynchronousEventService()
|
Method Summary | |
---|---|
void |
init()
Initializes the service |
abstract void |
processEvent(IEventMessage evt)
Processes the event. |
void |
run()
Process the messages. |
void |
start()
Start the service, registers this service with the event notifier to ensure that events published to the event notifier are posted on this service's queue for processing. |
void |
stop()
Stops the service, makes sure that any remaining events are still processed before the final shutdown. |
Methods inherited from class gov.nasa.arc.brahms.vm.api.jsvc.AbstractExternalService |
---|
assertFact, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, conclude, getContext, getID, getModel, getName, getVMController, getWorldState, isValidTruthValue, retractFact, send, send, send, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractAsynchronousEventService()
Method Detail |
---|
public void init()
init
in interface IExternalService
init
in class AbstractExternalService
public void start()
start
in interface IExternalService
start
in class AbstractExternalService
public void stop()
stop
in interface IExternalService
stop
in class AbstractExternalService
public void run()
run
in interface java.lang.Runnable
public abstract void processEvent(IEventMessage evt)
evt
- the IEventMessage to be handled.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |