Main Page | Packages | Class Hierarchy | Class List | File List | Class Members

saxparse.ControlMessage Class Reference

Inheritance diagram for saxparse.ControlMessage:

Inheritance graph
[legend]
Collaboration diagram for saxparse.ControlMessage:

Collaboration graph
[legend]
List of all members.

Detailed Description

ControlMessage Aug 14, 2004.

Process the XML elements associated with a trade engine control message. A control message will cause the trade engine to perform an action, like cancel an order, stop processing an order...

Author:
Ian Kaplan, www.bearcave.com, iank@bearcave.com


Public Member Functions

MessageBase getMessage ()
void element (String localName, Attributes attributes)
void characters (String str)
void endElement (String localName)

Private Attributes

MessageStates mCurrentState = States.BAD_STATE
Control mControl = new Control()


Member Function Documentation

void saxparse.ControlMessage.characters String  str  ) 
 

Implements saxparse.MessageInterface.

00068 { 00069 if (mCurrentState == States.MSG_BASE) { 00070 super.processCharacters( str, mControl ); 00071 } 00072 else if (mCurrentState == States.AIM_ORDER_ID) { 00073 mControl.setAimOrderID( str ); 00074 } 00075 else if (mCurrentState == States.OPERATION) { 00076 mControl.setOperation( str ); 00077 } 00078 } // characters

void saxparse.ControlMessage.element String  localName,
Attributes  attributes
 

Implements saxparse.MessageInterface.

00048 { 00049 mCurrentState = super.processElement(localName, attributes); 00050 if (mCurrentState == States.BAD_STATE) { 00051 System.out.println("ControlMessage: mCurrentState == " + 00052 mCurrentState ); 00053 } 00054 else if (mCurrentState != States.MSG_BASE) { 00055 if (localName.equals("aimOrderID")) { 00056 mCurrentState = States.AIM_ORDER_ID; 00057 } 00058 else if (localName.equals("operation")) { 00059 mCurrentState = States.OPERATION; 00060 } 00061 else { 00062 System.out.println("ControlMessage: unrecognized element = " + localName ); 00063 } 00064 } 00065 } // element

void saxparse.ControlMessage.endElement String  localName  ) 
 

Implements saxparse.MessageInterface.

00081 { 00082 if (mCurrentState == States.MSG_BASE) { 00083 super.processEndElement( localName ); 00084 } 00085 } // endElement

MessageBase saxparse.ControlMessage.getMessage  ) 
 

Implements saxparse.MessageInterface.

00043 { return mControl; }


Member Data Documentation

Control saxparse.ControlMessage.mControl = new Control() [private]
 

MessageStates saxparse.ControlMessage.mCurrentState = States.BAD_STATE [private]
 


The documentation for this class was generated from the following file:
Generated on Sat Aug 28 13:50:03 2004 for SaxParse by doxygen 1.3.8