RiverRat - An MIT iCampus project | http://web.mit.edu/riverrat/ |
Public Member Functions | |
RiverRatListener () | |
Default constructor. | |
RiverRatListener (ContentHandler somehandler) | |
Constructor. | |
RiverRatListener (ContentHandler somehandler, String connect_host, int connect_port) | |
Constructor. | |
void | startElement (String uri, String localpart, String rawname, Attributes attrs) throws SAXException |
This implements part of the ContentHandler interface, and is provided only for debugging. | |
void | endElement (String uri, String localpart, String rawname) throws SAXException |
This implements part of the ContentHandler interface, and is provided only for debugging. | |
void | startDocument () |
This implements part of the ContentHandler interface, and is provided only for debugging. | |
void | endDocument () |
This implements part of the ContentHandler interface, and is provided only for debugging. | |
void | warning (SAXParseException ex) throws SAXException |
These methods implement the ErrorHandler interface, and are required. | |
void | error (SAXParseException ex) throws SAXException |
These methods implement the ErrorHandler interface, and are required. | |
void | fatalError (SAXParseException ex) throws SAXException |
These methods implement the ErrorHandler interface, and are required. | |
void | run () |
Lights, camera, action. | |
Static Public Member Functions | |
void | main (String args[]) |
Test case. | |
Static Package Attributes | |
int | port = 8080 |
Port to connect on by default. | |
String | host = "localhost" |
Host to connect to by default. | |
final boolean | DELAY_INPUT = false |
Used for testing purposes, this uses the DelayedInputStream class to slow the data stream down and read chunks at a time. | |
final boolean | DEBUG = false |
Debugging. | |
DefaultHandler | defaulthandler |
ContentHandler | contenthandler |
PrintWriter | out |
XMLReader | parser |
Socket | socket |
InputStream | stream |
InputSource | source |
Definition at line 22 of file RiverRatListener.java.
|
Default constructor. Doesn't do anything besides make the object, and uses some debugging functions to handle XML parser callbacks. Definition at line 51 of file RiverRatListener.java. Referenced by riverrat.RiverRatListener.main(), and riverrat.RiverRatListener.run(). |
|
Constructor. Takes a class implementing the ContentHandler interface and sets the ContentHandler of the XML data stream pulled by the listener to the given class. The XML callbacks are sent to the that class. When this constructor is used, the default host ("localhost") and the default port (8080) are used to open the TCP connection.
Definition at line 64 of file RiverRatListener.java. |
|
Constructor. Takes a ContentHandler class and a server to connect to. The String connect_host specifies the hostname to pull data from, the int connect_port specifies the port to open the TCP connection on.
Definition at line 78 of file RiverRatListener.java. |
|
This implements part of the ContentHandler interface, and is provided only for debugging. These methods simply print the XML callbacks with raw names and attributes in a semi-human-readable form. Definition at line 123 of file RiverRatListener.java. |
|
This implements part of the ContentHandler interface, and is provided only for debugging. These methods simply print the XML callbacks with raw names and attributes in a semi-human-readable form. Definition at line 103 of file RiverRatListener.java. |
|
These methods implement the ErrorHandler interface, and are required. They are used for error handling while parsing with an external class. Definition at line 141 of file RiverRatListener.java. |
|
These methods implement the ErrorHandler interface, and are required. They are used for error handling while parsing with an external class. Definition at line 150 of file RiverRatListener.java. |
|
Test case. This starts a new RiverRatListener using some testing functions to print XML elements and attributes. Definition at line 225 of file RiverRatListener.java. References riverrat.RiverRatListener.RiverRatListener(). |
|
Lights, camera, action. This is where the cool stuff happens. When the a RiverRatListener is made into a thread, this gets run. It initializes the parser, opens a TCP connection, and runs the XML data through the parser. The parser then calls the required methods in the ContentHandler class being used for XML parsing callbacks. Definition at line 162 of file RiverRatListener.java. References riverrat.RiverRatListener.DELAY_INPUT, and riverrat.RiverRatListener.RiverRatListener(). |
|
This implements part of the ContentHandler interface, and is provided only for debugging. These methods simply print the XML callbacks with raw names and attributes in a semi-human-readable form. Definition at line 113 of file RiverRatListener.java. |
|
This implements part of the ContentHandler interface, and is provided only for debugging. These methods simply print the XML callbacks with raw names and attributes in a semi-human-readable form. Definition at line 89 of file RiverRatListener.java. |
|
These methods implement the ErrorHandler interface, and are required. They are used for error handling while parsing with an external class. Definition at line 132 of file RiverRatListener.java. |
|
Used for testing purposes, this uses the DelayedInputStream class to slow the data stream down and read chunks at a time.
Definition at line 33 of file RiverRatListener.java. Referenced by riverrat.RiverRatListener.run(). |