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

pullparse.Control Class Reference

Inheritance diagram for pullparse.Control:

Inheritance graph
[legend]
Collaboration diagram for pullparse.Control:

Collaboration graph
[legend]
List of all members.

Detailed Description

Control Aug 14, 2004.

A market control message. For example, cancel an order. Stop processing an aim order, etc...

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


Public Member Functions

String getAimOrderID ()
String getOperation ()
String toString ()

Protected Member Functions

void initialize (XmlPullParser parser) throws ParseException, XmlPullParserException, IOException

Private Member Functions

void setAimOrderID (String aimOrderID)
void setOperation (String operation)

Private Attributes

String mAimOrderID = null
String mOperation = null
MessageStates mCurrentState = MessageStates.START_MSG


Member Function Documentation

String pullparse.Control.getAimOrderID  ) 
 

00049 { 00050 return mAimOrderID; 00051 }

String pullparse.Control.getOperation  ) 
 

00055 { 00056 return mOperation; 00057 }

void pullparse.Control.initialize XmlPullParser  parser  )  throws ParseException, XmlPullParserException, IOException [protected]
 

Reimplemented from pullparse.MessageBase.

00064 { 00065 super.initialize( parser ); 00066 while (mCurrentState != MessageStates.END_MSG) { 00067 int eventType = parser.next(); 00068 if (eventType == XmlPullParser.START_TAG) { 00069 String localName = parser.getName(); 00070 if (localName.equals("aimOrderID")) { 00071 mCurrentState = MessageStates.AIM_ORDER_ID; 00072 } 00073 else if (localName.equals("operation")) { 00074 mCurrentState = MessageStates.OPERATION; 00075 } 00076 } 00077 else if (eventType == XmlPullParser.TEXT) { 00078 if (mCurrentState == MessageStates.AIM_ORDER_ID) { 00079 String text = parser.getText(); 00080 text = text.trim(); 00081 if (text.length() > 0) { 00082 setAimOrderID( text ); 00083 } 00084 } 00085 else if (mCurrentState == MessageStates.OPERATION) { 00086 String text = parser.getText(); 00087 text = text.trim(); 00088 if (text.length() > 0) { 00089 setOperation( text ); 00090 } 00091 } 00092 } 00093 else if (eventType == XmlPullParser.END_TAG) { 00094 String localName = parser.getName(); 00095 if (localName.equals("control")) { 00096 mCurrentState = MessageStates.END_MSG; 00097 } 00098 } 00099 } // while 00100 } // initialize

void pullparse.Control.setAimOrderID String  aimOrderID  )  [private]
 

00052 { 00053 mAimOrderID = aimOrderID; 00054 }

void pullparse.Control.setOperation String  operation  )  [private]
 

00058 { 00059 mOperation = operation; 00060 }

String pullparse.Control.toString  ) 
 

00103 { 00104 ByteArrayOutputStream bos = new ByteArrayOutputStream(); 00105 PrintStream ps = new PrintStream( bos ); 00106 super.toStream( ps ); 00107 ps.println("aim order ID: " + mAimOrderID ); 00108 ps.println("operation: " + mOperation ); 00109 String str = bos.toString(); 00110 return str; 00111 }


Member Data Documentation

String pullparse.Control.mAimOrderID = null [private]
 

MessageStates pullparse.Control.mCurrentState = MessageStates.START_MSG [private]
 

Reimplemented from pullparse.MessageBase.

String pullparse.Control.mOperation = null [private]
 


The documentation for this class was generated from the following file:
Generated on Sat Aug 28 14:08:26 2004 for PullParse by doxygen 1.3.8