com.caucho.memcached
Class MemcachedConnection

java.lang.Object
  extended by com.caucho.memcached.MemcachedConnection
All Implemented Interfaces:
ProtocolConnection

public class MemcachedConnection
extends java.lang.Object
implements ProtocolConnection

Custom serialization for the cache


Method Summary
 java.lang.String getProtocolRequestURL()
          Returns a request URL for debugging/management.
 boolean handleRequest()
          Handles a new request.
 boolean handleResume()
          Handles a resumption of the connection for an async/comet request.
 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 onStartConnection()
          Called when the connection starts, i.e.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getProtocolRequestURL

public java.lang.String getProtocolRequestURL()
Description copied from interface: ProtocolConnection
Returns a request URL for debugging/management.

Specified by:
getProtocolRequestURL in interface ProtocolConnection

init

public void init()
Description copied from interface: ProtocolConnection
Initialize the connection. At this point, the current thread is the connection thread.

Specified by:
init in interface ProtocolConnection

handleRequest

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

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

handleResume

public boolean handleResume()
                     throws java.io.IOException
Description copied from interface: ProtocolConnection
Handles a resumption of the connection for an async/comet request.

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

isWaitForRead

public boolean isWaitForRead()
Description copied from interface: ProtocolConnection
Return true if the connection should wait for a read before handling the request.

Specified by:
isWaitForRead in interface ProtocolConnection

onCloseConnection

public void onCloseConnection()
Description copied from interface: ProtocolConnection
Handles a close event when the connection is closed.

Specified by:
onCloseConnection in interface ProtocolConnection

onStartConnection

public void onStartConnection()
Description copied from interface: ProtocolConnection
Called when the connection starts, i.e. just after the accept

Specified by:
onStartConnection in interface ProtocolConnection

toString

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