gov.nasa.arc.brahms.vm.api.jsvc
Class AbstractSynchronousEventService

java.lang.Object
  extended by gov.nasa.arc.brahms.vm.api.jsvc.AbstractExternalService
      extended by gov.nasa.arc.brahms.vm.api.jsvc.AbstractSynchronousEventService
All Implemented Interfaces:
IExternalService

public abstract class AbstractSynchronousEventService
extends AbstractExternalService

The AbstractSynchronousEventService is a base class for external services that want to handle the events generated by the virtual machine synchronously. This means that any events send to this service will be handled in full before returning control to the virtual machine.

Version:
28 September 2000
Author:
Ron van Hoof
See Also:
AbstractExternalService, IExternalService

Constructor Summary
AbstractSynchronousEventService()
           
 
Method Summary
 void init()
          Initializes the service
abstract  void processEvent(IEventMessage evt)
          Processes the event.
 void start()
          Start the service, registering the service with the event notifier so it can receive the events published to the event notifier.
 void stop()
          Stops the service, unregistering the service with the event notifier.
 
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

AbstractSynchronousEventService

public AbstractSynchronousEventService()
Method Detail

init

public void init()
Initializes the service

Specified by:
init in interface IExternalService
Specified by:
init in class AbstractExternalService

start

public void start()
Start the service, registering the service with the event notifier so it can receive the events published to the event notifier. The events are handled in the processEvent method.

Specified by:
start in interface IExternalService
Specified by:
start in class AbstractExternalService

stop

public void stop()
Stops the service, unregistering the service with the event notifier. Events published to the event notifier are no longer received and handled.

Specified by:
stop in interface IExternalService
Specified by:
stop in class AbstractExternalService

processEvent

public abstract void processEvent(IEventMessage evt)
Processes the event.

Parameters:
evt - the IEventMessage to be handled.


Copyright © 1997-2012 All Rights Reserved.