com.caucho.memcached
Class MemcachedConnection

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

public class MemcachedConnection
extends AbstractProtocolConnection

Custom serialization for the cache


Method Summary
 java.lang.String getProtocolRequestURL()
          Returns a default debugging identifier for the connection
 boolean handleRequest()
          Handles a new connection.
 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 com.caucho.network.listen.AbstractProtocolConnection
onAttachThread, onDetachThread
 
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 class: AbstractProtocolConnection
Returns a default debugging identifier for the connection

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

init

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

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

handleRequest

public boolean handleRequest()
                      throws java.io.IOException
Description copied from class: AbstractProtocolConnection
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
Description copied from class: AbstractProtocolConnection
Handles a resumption of the connection for an async/comet request.

Specified by:
handleResume in interface ProtocolConnection
Overrides:
handleResume in class AbstractProtocolConnection
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.


onCloseConnection

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

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

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
Overrides:
onStartConnection in class AbstractProtocolConnection

toString

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