|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JabberProtocol
public class JabberProtocol
The main Jabber protocol handler. It actually delegates all the incoming data processing to the xml SAX handlers. This handler actually works more as a state manager. The way it works is that when incoming xml message comes in, it will select the proper message processor to parse the rest of the data.
Nested Class Summary | |
---|---|
class |
JabberProtocol.SAXReaderThread
Used by the low level protocol handler to read in the data. |
Field Summary | |
---|---|
protected JabberContentHandler |
contentHandler
|
static java.lang.String |
DEFAULT_PARSER
|
protected JabberErrorHandler |
errorHandler
|
protected MessageRequestQueue |
queue
|
protected JabberProtocol.SAXReaderThread |
reader
|
protected alt.java.net.Socket |
socket
|
protected static int |
SOCKETBUF
|
Constructor Summary | |
---|---|
JabberProtocol(JabberContentHandler contentHandler,
MessageRequestQueue queue)
|
Method Summary | |
---|---|
void |
handle(alt.java.net.Socket socket)
Handles the connection details, including handshaking and data processing. |
void |
send(JabberMessage msg)
queues up the data and wait for thread to send out the data |
void |
shutdown()
Shuts down the protocol |
void |
start()
Does all the resetting before a connection begins |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_PARSER
protected static final int SOCKETBUF
protected MessageRequestQueue queue
protected JabberErrorHandler errorHandler
protected JabberContentHandler contentHandler
protected JabberProtocol.SAXReaderThread reader
protected alt.java.net.Socket socket
Constructor Detail |
---|
public JabberProtocol(JabberContentHandler contentHandler, MessageRequestQueue queue)
Method Detail |
---|
public void handle(alt.java.net.Socket socket) throws java.io.IOException
SocketHandler
handle
in interface SocketHandler
java.io.IOException
- when any processing error occurspublic void shutdown()
shutdown
in interface SocketHandler
public void start()
start
in interface SocketHandler
public void send(JabberMessage msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |