org.objectweb.jonas.ha.interceptor
Class HACurrentDelegateImpl

java.lang.Object
  extended byorg.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
 org.objectweb.carol.cmi.ha.ViewIdWrapper getClientViewIdWrapper()
          Get the client view id wrapper
static HACurrentDelegateImpl getCurrent()
          Returns the unique instance
 java.util.Stack getRequests()
          Get the request stack
 org.objectweb.carol.cmi.ha.ViewIdWrapper getServerViewIdWrapper()
          Get the server view id wrapper
 boolean isOnFailover()
          Gets the onFailover variable
 void pushClientViewIdWrapper(org.objectweb.carol.cmi.ha.ViewIdWrapper info)
          Set the client view id wrapper
 void pushServerViewIdWrapper(org.objectweb.carol.cmi.ha.ViewIdWrapper info)
          Set the server view id wrapper
 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

pushClientViewIdWrapper

public void pushClientViewIdWrapper(org.objectweb.carol.cmi.ha.ViewIdWrapper info)
Set the client view id wrapper

Specified by:
pushClientViewIdWrapper in interface org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate

getClientViewIdWrapper

public org.objectweb.carol.cmi.ha.ViewIdWrapper getClientViewIdWrapper()
Get the client view id wrapper

Specified by:
getClientViewIdWrapper in interface org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate
Returns:
view id wrapper

pushServerViewIdWrapper

public void pushServerViewIdWrapper(org.objectweb.carol.cmi.ha.ViewIdWrapper info)
Set the server view id wrapper

Specified by:
pushServerViewIdWrapper in interface org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate

getServerViewIdWrapper

public org.objectweb.carol.cmi.ha.ViewIdWrapper getServerViewIdWrapper()
Get the server view id wrapper

Specified by:
getServerViewIdWrapper in interface org.objectweb.carol.cmi.ha.interceptor.HACurrentDelegate
Returns:
view id wrapper