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

Quick Search    Search Deep

org.miamm.soapmmil.test.echo
Class EchoMIAMMClient  view EchoMIAMMClient download EchoMIAMMClient.java

java.lang.Object
  extended byorg.miamm.soapmmil.MIAMMService
      extended byorg.miamm.soapmmil.test.echo.EchoMIAMMClient
All Implemented Interfaces:
org.miamm.soapmmil.SoapMMILConstants

public class EchoMIAMMClient
extends org.miamm.soapmmil.MIAMMService
implements org.miamm.soapmmil.SoapMMILConstants

A toy_event generator; this is run from the console, and takes its inputs as command-line arguments

Version:
$Revision: 1.8 $
$Date: 2003/04/22 23:01:15 $

Nested Class Summary
 
Nested classes inherited from class org.miamm.soapmmil.MIAMMService
 
Field Summary
(package private) static java.lang.String ELEMENT_TAG_ROOT
           
(package private)  org.apache.log4j.Logger logger
           
 
Fields inherited from class org.miamm.soapmmil.MIAMMService
 
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
EchoMIAMMClient()
           
 
Method Summary
static void main(java.lang.String[] args)
          All arguments will be fired off as messages, except for one-letter switches.
 void recogniseEvent(org.miamm.soapmmil.SoapmmilMessage message)
          Do the main work of this service.
 void restart()
          Reinitialise the service.
 void send(org.miamm.castor.headerblock.types.MsgContentType msgType, java.lang.String text)
           
 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

ELEMENT_TAG_ROOT

static final java.lang.String ELEMENT_TAG_ROOT
See Also:
Constant Field Values

logger

org.apache.log4j.Logger logger
Constructor Detail

EchoMIAMMClient

public EchoMIAMMClient()
                throws org.miamm.soapmmil.MIAMMException
Method Detail

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()
          throws org.miamm.soapmmil.MIAMMException
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)
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.


send

public void send(org.miamm.castor.headerblock.types.MsgContentType msgType,
                 java.lang.String text)
          throws org.miamm.soapmmil.MIAMMException,
                 org.xml.sax.SAXException

main

public static void main(java.lang.String[] args)
All arguments will be fired off as messages, except for one-letter switches. Anytime you have an argument like "-x", it sets the message type for future messages to "x". If the message type "x" does not exist, we supply instead a default. So the way you would do this is is java EchoMIAMMClient\ -a "this is an a message" "this is another message"\ -b "this is a b message"\ -a "back to a messages" "blah blah blah"\ -c "oh look a c message"