java.lang.Object
org.miamm.soapmmil.MIAMMService
org.miamm.soapmmil.agents.NullMIAMMService
- All Implemented Interfaces:
- org.miamm.soapmmil.SoapMMILConstants
- Direct Known Subclasses:
- BrokenMIAMMService
- public class NullMIAMMService
- extends org.miamm.soapmmil.MIAMMService
A minimal implementation of MIAMMService.
Used for unit testing... probably doesn't do anything interesting.
Look in the samples if what you had in mind was to find out how to
use the SoapMMIL
FIXME: why is it, when running the unit tests from a gui, the
_msgRecognisedCount is impossible to reset?
- Version:
- $Revision: 1.1 $
$Date: 2003/05/04 20:45:50 $
| Nested classes inherited from class org.miamm.soapmmil.MIAMMService |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_hasStarted
protected static boolean _hasStarted
_hasRestarted
protected static boolean _hasRestarted
_hasStopped
protected static boolean _hasStopped
_hasReceived
protected static boolean _hasReceived
_msgRecognisedCount
protected static int _msgRecognisedCount
_logger
static org.apache.log4j.Logger _logger
NullMIAMMService
public NullMIAMMService()
throws org.miamm.soapmmil.MIAMMException
reset
public static void reset()
start
public void start()
- Description copied from class:
org.miamm.soapmmil.MIAMMService
- Initialise the service. This is called only once in the life-cycle
of the service. This would also be the right time to register the
types of messages we are interested in receiving. This does not
guarantee that all messages of these types will come to the
service, but that the only messages received by the service will be
of these types.
restart
public void restart()
- Description copied from class:
org.miamm.soapmmil.MIAMMService
- Reinitialise the service. I don't see why you wouldn't just call
stop and then call start again, but who knows.
FIXME: decide whether or not to keep this function
stop
public void stop()
- Description copied from class:
org.miamm.soapmmil.MIAMMService
- Stops the service and does any cleanup. This would be a good
time to save stuff to disk, for example
recogniseEvent
public void recogniseEvent(org.miamm.soapmmil.SoapmmilMessage message)
throws org.miamm.soapmmil.MIAMMException
- Description copied from class:
org.miamm.soapmmil.MIAMMService
- Do the main work of this service. This function is only called
when the SoapMMIL detects an incoming message of a type that we
explicitly allow.
incrementCounter
private static void incrementCounter()
getMsgRecognisedCount
public static int getMsgRecognisedCount()
- Exposes the soapmmil engine connected to this service.
This is normally a no-no, but we need it for unit testing
hasStarted
public static boolean hasStarted()
hasRestarted
public static boolean hasRestarted()
hasStopped
public static boolean hasStopped()