|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.media.mn8.protocol.jabber.JabberStream
The stream to a jabber server.
Constructor Summary | |
JabberStream(ConnectorInterface connectorInterface)
Constructor. |
|
JabberStream(ConnectorInterface connectorInterface,
JabberListener theListener)
Constructor. |
|
JabberStream(ConnectorInterface connectorInterface,
JabberListener theListener,
boolean connect)
Constructor. |
Method Summary | |
void |
close()
Method to close the connection to the server and tell the listener that the connection has been terminated. |
void |
open(ConnectorInterface connectorInterface)
Method to open the connection to the server. |
void |
plaintextEncountered(java.lang.String text)
Method called when some plain text is encountered in the XML stream comming from the server. |
void |
run()
The threads run method. |
void |
send(byte[] data)
Method of sending data to the server. |
void |
send(JabberDataBlock block)
Method of sending a Jabber datablock to the server. |
void |
send(java.lang.String data)
Method of sending data to the server. |
void |
setJabberListener(JabberListener listener)
Set the listener to this stream. |
void |
tagEnded(java.lang.String name)
The method called when a tag is ended in the stream comming from the server. |
void |
tagStarted(java.lang.String name,
java.util.Hashtable attributes)
Method called when an XML tag is started in the stream comming from the server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JabberStream(ConnectorInterface connectorInterface) throws java.io.IOException
connectorInterface
- The connector which establishes the socket for
the connectionpublic JabberStream(ConnectorInterface connectorInterface, JabberListener theListener) throws java.io.IOException
connectorInterface
- The connector which establishes the socket for the connectiontheListener
- The listener object to send all messages arriving on this stream topublic JabberStream(ConnectorInterface connectorInterface, JabberListener theListener, boolean connect) throws java.io.IOException
connectorInterface
- The connector which establishes the socket for the connectiontheListener
- The listener object to send all messages arriving on this stream toconnect
- Flag to say whether or not to connect during object instanciation (true = yes, false = no).Method Detail |
public void open(ConnectorInterface connectorInterface) throws java.io.IOException
connectorInterface
- The connector which establishes the socket for the connectionpublic void run()
run
in interface java.lang.Runnable
public void close()
public void send(byte[] data) throws java.io.IOException
data
- The data to send.public void send(java.lang.String data) throws java.io.IOException
The
- data to send to the server.public void send(JabberDataBlock block) throws java.io.IOException
block
- The data block to send to the server.public void setJabberListener(JabberListener listener)
public void tagStarted(java.lang.String name, java.util.Hashtable attributes)
tagStarted
in interface XMLEventListener
name
- Tag name.attributes
- The tags attributes.public void plaintextEncountered(java.lang.String text)
plaintextEncountered
in interface XMLEventListener
text
- The plain text in questionpublic void tagEnded(java.lang.String name)
tagEnded
in interface XMLEventListener
name
- The name of the tag that has just ended.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |