Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.miamm.soapmmil
Class MIAMMServiceTemplate  view MIAMMServiceTemplate download MIAMMServiceTemplate.java

java.lang.Object
  extended byorg.miamm.soapmmil.MIAMMService
      extended byorg.miamm.soapmmil.MIAMMServiceTemplate
All Implemented Interfaces:
SoapMMILConstants

public final class MIAMMServiceTemplate
extends MIAMMService

A template for lazy MIAMM programmers. You should be able to find this file in the etc directory of SoapMMIL. This template assumes you use a SAX parser, but you are not obliged to do the same. Do not extend this class; copy and paste instead.

Version:
$Revision: 1.10 $
$Date: 2003/04/22 23:01:00 $

Nested Class Summary
 
Nested classes inherited from class org.miamm.soapmmil.MIAMMService
 
Field Summary
(package private) static org.apache.log4j.Logger _logger
           
 
Fields inherited from class org.miamm.soapmmil.MIAMMService
_instanceMap
 
Fields inherited from interface org.miamm.soapmmil.SoapMMILConstants
ELEMENT_MISOH_BLOCK, LOG4J_PROPERTY, misohDescriptor, NAMESPACE_PREFIX_MIAMM, NAMESPACE_URI_MIAMM, PROPERTY_MIAMM_SMART_RECEIVER, PROPERTY_MIAMM_URLFILE
 
Constructor Summary
MIAMMServiceTemplate()
           
 
Method Summary
 void doSomethingClever()
           
 void parseXML(java.io.Reader xml)
           
 void recogniseEvent(SoapmmilMessage message)
          Do the main work of this service.
 void restart()
          Reinitialise the service.
 void sendFoo()
           
 void start()
          Initialise the service.
 void stop()
          Stops the service and does any cleanup.
 
Methods inherited from class org.miamm.soapmmil.MIAMMService
getDebuggingId, getDumbOutgoingURL, getServiceName, getServiceTable, getSmartOutgoingURL, receiveMessage, recogniseEvent, soapmmil
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

static org.apache.log4j.Logger _logger
Constructor Detail

MIAMMServiceTemplate

public MIAMMServiceTemplate()
                     throws MIAMMException
Method Detail

start

public void start()
           throws MIAMMException
Description copied from class: 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.

Specified by:
start in class MIAMMService

restart

public void restart()
             throws MIAMMException
Description copied from class: 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

Specified by:
restart in class MIAMMService

stop

public void stop()
          throws MIAMMException
Description copied from class: MIAMMService
Stops the service and does any cleanup. This would be a good time to save stuff to disk, for example

Specified by:
stop in class MIAMMService

recogniseEvent

public void recogniseEvent(SoapmmilMessage message)
                    throws MIAMMException
Description copied from class: 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.

Overrides:
recogniseEvent in class MIAMMService

doSomethingClever

public void doSomethingClever()
                       throws MIAMMException

sendFoo

public void sendFoo()
             throws MIAMMException

parseXML

public void parseXML(java.io.Reader xml)
              throws MIAMMException