org.objectweb.jonas.ha.interceptor
Class HACurrentDelegateImpl

java.lang.Object
  extended by org.objectweb.jonas.ha.interceptor.HACurrentDelegateImpl
All Implemented Interfaces:
org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate

public class HACurrentDelegateImpl
extends java.lang.Object
implements org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate

This class handles the HAContext/Thread association

Author:
Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es), Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es)

Constructor Summary
HACurrentDelegateImpl()
           
 
Method Summary
static HACurrentDelegateImpl getCurrent()
          Returns the unique instance
 java.util.Stack getRequests()
          Get the request stack
 org.objectweb.carol.cmi.ha.ViewIdWrapper getViewIdWrapper()
           
 boolean isOnFailover()
          Gets the onFailover variable
 void pushViewIdWrapper(org.objectweb.carol.cmi.ha.ViewIdWrapper info)
           
 void putNextReq(org.objectweb.carol.cmi.ha.RequestId nextReq)
          Put the request in the request stack
 void setOnFailover(boolean onFailover)
          Sets the onFailover variable
 void setRequests(java.util.Stack requests)
          Set the requests stack in the current context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HACurrentDelegateImpl

public HACurrentDelegateImpl()
Method Detail

getCurrent

public static HACurrentDelegateImpl getCurrent()
Returns the unique instance

Returns:
the current instance

setRequests

public void setRequests(java.util.Stack requests)
Set the requests stack in the current context

Parameters:
requests - the next request

getRequests

public java.util.Stack getRequests()
Get the request stack

Returns:
the request stack

putNextReq

public void putNextReq(org.objectweb.carol.cmi.ha.RequestId nextReq)
Put the request in the request stack

Specified by:
putNextReq in interface org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate
Parameters:
nextReq - the next request

setOnFailover

public void setOnFailover(boolean onFailover)
Sets the onFailover variable

Specified by:
setOnFailover in interface org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate
Parameters:
onFailover -

isOnFailover

public boolean isOnFailover()
Gets the onFailover variable

Specified by:
isOnFailover in interface org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate
Returns:
true if on failover

pushViewIdWrapper

public void pushViewIdWrapper(org.objectweb.carol.cmi.ha.ViewIdWrapper info)
Specified by:
pushViewIdWrapper in interface org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate

getViewIdWrapper

public org.objectweb.carol.cmi.ha.ViewIdWrapper getViewIdWrapper()
Specified by:
getViewIdWrapper in interface org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate