java.lang.Object
org.miamm.soapmmil.MIAMMService
org.miamm.soapmmil.test.simple.SimpleMIAMMService
- All Implemented Interfaces:
- SimpleMIAMMServiceConstants, org.miamm.soapmmil.SoapMMILConstants
- Direct Known Subclasses:
- SimpleMIAMMService_Alpha, SimpleMIAMMService_Bravo, SimpleMIAMMService_Charlie, SimpleMIAMMService_Zulu
- public abstract class SimpleMIAMMService
- extends org.miamm.soapmmil.MIAMMService
- implements SimpleMIAMMServiceConstants, org.miamm.soapmmil.SoapMMILConstants
A less minimal implementation of SAXedMIAMMService.
All the services described in the package notes simple extend this
class and implement the getID function, returning a
single character representing their id
- Version:
- $Revision: 1.18 $
$Date: 2003/04/22 23:01:21 $
| 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 |
SIMPLE_TEST_STRING_PROPERTY
public final java.lang.String SIMPLE_TEST_STRING_PROPERTY
- See Also:
- Constant Field Values
SIMPLE_TEST_STRING_DEFAULT
public final java.lang.String SIMPLE_TEST_STRING_DEFAULT
- See Also:
- Constant Field Values
NAMESPACE_AWARE
public final java.lang.String NAMESPACE_AWARE
- See Also:
- Constant Field Values
logger
static org.apache.log4j.Logger logger
_hasStarted
boolean _hasStarted
SimpleMIAMMService
public SimpleMIAMMService()
throws org.miamm.soapmmil.MIAMMException
getID
public abstract java.lang.Character getID()
- Return a single character that identifies this service. Examples
are 'a', 'b', 'c' :-)
start
public void start()
throws org.miamm.soapmmil.MIAMMException
- 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()
throws org.miamm.soapmmil.MIAMMException
- 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.
fireMessage
public void fireMessage(java.lang.String reality,
java.lang.String dream)
throws java.lang.Exception
- Send off a message that states what is to be the next reality and
dream. This covers the whole SoapMMIL outgoing-message procedure.
getMsgContentType
protected org.miamm.castor.headerblock.types.MsgContentType getMsgContentType(char character)
- Return the MsgContentType that the character maps to.
This function is specific to the Simple test; we assign the toy
events such that:
TOY_EVENT_A means the next character in the dream is 'a'
TOY_EVENT_B means the next character in the dream is 'b'
TOY_EVENT_C means the next charecter in the dream is 'c'
TOY_EVENT_Z means anything not captured by the above