|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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(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(String data)
Method of sending data to the server. |
void |
setJabberListener(JabberListener listener)
Set the listener to this stream. |
void |
tagEnded(String name)
The method called when a tag is ended in the stream comming from the server. |
void |
tagStarted(String name,
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 IOException
connectorInterface
- The connector which establishes the socket for
the connectionpublic JabberStream(ConnectorInterface connectorInterface, JabberListener theListener) throws 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 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 IOException
connectorInterface
- The connector which establishes the socket for the connection
IOException
public void run()
run
in interface Runnable
public void close()
public void send(byte[] data) throws IOException
data
- The data to send.
IOException
public void send(String data) throws IOException
IOException
public void send(JabberDataBlock block) throws IOException
block
- The data block to send to the server.
IOException
public void setJabberListener(JabberListener listener)
public void tagStarted(String name, Hashtable attributes)
tagStarted
in interface XMLEventListener
name
- Tag name.attributes
- The tags attributes.public void plaintextEncountered(String text)
plaintextEncountered
in interface XMLEventListener
text
- The plain text in questionpublic void tagEnded(String name)
tagEnded
in interface XMLEventListener
name
- The name of the tag that has just ended.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |