|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--XMLSocket
XMLSocket is a socket wrapper which reads the socket to get XML blocks. Messages are split up and sent to the listeners. XMLSocket is used to read and parse XML from a socket.
| Constructor Summary | |
XMLSocket(java.net.Socket client)
Default constructor |
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
adds a PropertyChangeListener for a message |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener pcl)
adds a PropertyChangeListener for a message |
void |
close()
closes the socket |
XMLString |
getNextMessage()
get the next message from the queue |
boolean |
hasMessage()
is there a message waiting in the queue |
boolean |
isDone()
Is the XMLSocket finished with the socket |
void |
parseXML(XParser up,
java.io.Reader read)
Parse XML with a parser, results are in the XParser |
void |
parseXML(XParser up,
java.lang.String xml)
Parse XML with a parser, results are in the XParser |
void |
run()
reader thread, fires events |
void |
sendMessage(java.lang.String message)
sends an string to the socket (preferrably XML) |
void |
setThrowEvent(boolean t)
tell the XMLSocket to fire newMessage events per each successful read or not. |
void |
startThread()
Starts the Reader Thread |
void |
unPopMessage(XMLString xml)
Put a message at the start of the queue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XMLSocket(java.net.Socket client)
throws java.io.IOException
client - the ClientHandler| Method Detail |
public void startThread()
public void setThrowEvent(boolean t)
t - "Fire a newMessage event per xml event?"public void run()
run in interface java.lang.Runnablepublic boolean isDone()
public void sendMessage(java.lang.String message)
message - the message to send.public boolean hasMessage()
public XMLString getNextMessage()
public void unPopMessage(XMLString xml)
xml - the XMLString message to put at the start of the queue
public void parseXML(XParser up,
java.io.Reader read)
throws org.xml.sax.SAXException,
java.io.IOException
up - the XParser to the parse the XMLread - the reader to provide the XML.
org.xml.sax.SAXException - if there is an XML parser error
java.io.IOException - if there is an IO parser error
public void parseXML(XParser up,
java.lang.String xml)
throws org.xml.sax.SAXException,
java.io.IOException
up - the XParser to the parse the XMLxml - the XML to parse.
org.xml.sax.SAXException - if there is an XML parser error
java.io.IOException - if there is an IO parser errorpublic void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
pcl - the property change listener to add
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener pcl)
propertyName - the property to watch forpcl - the property change listener to add
public void close()
throws java.io.IOException
java.io.IOException - in case of IO Error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||