com.caucho.xmpp
Class XmppRequest

java.lang.Object
  extended by com.caucho.network.listen.AbstractProtocolConnection
      extended by com.caucho.xmpp.XmppRequest
All Implemented Interfaces:
ProtocolConnection

public class XmppRequest
extends AbstractProtocolConnection

XMPP protocol


Method Summary
 TcpSocketLink getConnection()
          Returns the tcp connection
 boolean handleRequest()
          Handles a new connection.
 boolean handleResume()
          Resumes processing after a wait.
 void init()
          Initialize the connection.
 boolean isWaitForRead()
          Return true if the connection should wait for a read before handling the request.
 void onCloseConnection()
          Handles a close event when the connection is closed.
 void startConnection()
          Called when the connection starts.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.network.listen.AbstractProtocolConnection
getProtocolRequestURL, onStartConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getConnection

public TcpSocketLink getConnection()
Returns the tcp connection


init

public void init()
Initialize the connection. At this point, the current thread is the connection thread.

Specified by:
init in interface ProtocolConnection
Overrides:
init in class AbstractProtocolConnection

isWaitForRead

public boolean isWaitForRead()
Return true if the connection should wait for a read before handling the request.


startConnection

public void startConnection()
Called when the connection starts.


handleRequest

public boolean handleRequest()
                      throws java.io.IOException
Handles a new connection. The controlling TcpServer may call handleConnection again after the connection completes, so the implementation must initialize any variables for each connection.

Specified by:
handleRequest in interface ProtocolConnection
Specified by:
handleRequest in class AbstractProtocolConnection
Throws:
java.io.IOException

handleResume

public boolean handleResume()
                     throws java.io.IOException
Resumes processing after a wait.

Specified by:
handleResume in interface ProtocolConnection
Overrides:
handleResume in class AbstractProtocolConnection
Throws:
java.io.IOException

onCloseConnection

public void onCloseConnection()
Handles a close event when the connection is closed.

Specified by:
onCloseConnection in interface ProtocolConnection
Overrides:
onCloseConnection in class AbstractProtocolConnection

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object