com.caucho.xmpp
Class XmppRequest

java.lang.Object
  extended by com.caucho.xmpp.XmppRequest
All Implemented Interfaces:
ServerRequest, TcpServerRequest

public class XmppRequest
extends java.lang.Object
implements TcpServerRequest

XMPP protocol


Method Summary
 TcpConnection 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 protocolCloseEvent()
          Handles a close event when the connection is closed.
 void startConnection()
          Called when the connection starts.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getConnection

public TcpConnection getConnection()
Returns the tcp connection

Specified by:
getConnection in interface TcpServerRequest

init

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

Specified by:
init in interface ServerRequest

isWaitForRead

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

Specified by:
isWaitForRead in interface ServerRequest

startConnection

public void startConnection()
Called when the connection starts.

Specified by:
startConnection in interface ServerRequest

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 ServerRequest
Throws:
java.io.IOException

handleResume

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

Specified by:
handleResume in interface ServerRequest
Throws:
java.io.IOException

protocolCloseEvent

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

Specified by:
protocolCloseEvent in interface ServerRequest

toString

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