edu.cuny.cat.comm
Class TimableCatpProactiveSession

java.lang.Object
  extended by edu.cuny.cat.comm.Session<CatpMessage>
      extended by edu.cuny.cat.comm.CatpProactiveSession
          extended by edu.cuny.cat.comm.TimableCatpProactiveSession

public abstract class TimableCatpProactiveSession
extends CatpProactiveSession

This class processes a time-sensitive request/response session initiated by the current party.

Version:
$Revision: 1.8 $
Author:
Jinzhong Niu

Field Summary
 
Fields inherited from class edu.cuny.cat.comm.CatpProactiveSession
completed, request
 
Fields inherited from class edu.cuny.cat.comm.Session
MAX_ATTEMPT
 
Constructor Summary
TimableCatpProactiveSession(Connection<CatpMessage> connection)
           
TimableCatpProactiveSession(Connection<CatpMessage> connection, CatpRequest request)
           
 
Method Summary
 void cancelTimeOutAction()
           
 boolean forceOut()
          cleans up if this session has to terminate abnormally.
 TimeoutTask getTimeoutAction()
           
 void processResponse(CatpResponse response)
           
 void setTimeoutAction(TimeoutTask timeoutAction)
           
abstract  void timeout()
          called by timeoutAction to process a timeout.
protected  void timeoutWrapper()
           
 
Methods inherited from class edu.cuny.cat.comm.CatpProactiveSession
getRequest, isCompleted, sendRequest, setCompleted, setRequest
 
Methods inherited from class edu.cuny.cat.comm.Session
sendMessage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimableCatpProactiveSession

public TimableCatpProactiveSession(Connection<CatpMessage> connection)

TimableCatpProactiveSession

public TimableCatpProactiveSession(Connection<CatpMessage> connection,
                                   CatpRequest request)
Method Detail

processResponse

public void processResponse(CatpResponse response)
                     throws CatException
Overrides:
processResponse in class CatpProactiveSession
Throws:
CatException

cancelTimeOutAction

public void cancelTimeOutAction()

forceOut

public boolean forceOut()
Description copied from class: Session
cleans up if this session has to terminate abnormally.

Overrides:
forceOut in class CatpProactiveSession
Returns:
if the early termination is successful or not.

setTimeoutAction

public void setTimeoutAction(TimeoutTask timeoutAction)

getTimeoutAction

public TimeoutTask getTimeoutAction()

timeoutWrapper

protected void timeoutWrapper()

timeout

public abstract void timeout()
called by timeoutAction to process a timeout.