fr.dyade.aaa.jndi2.ha
Class HARequestManager

java.lang.Object
  extended by fr.dyade.aaa.jndi2.ha.HARequestManager
All Implemented Interfaces:
BagSerializer, LifeCycleListener, java.io.Serializable

public class HARequestManager
extends java.lang.Object
implements LifeCycleListener, BagSerializer, java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.lang.String HA_REQUEST_COUNTER
           
static int IDEMPOTENT
           
private  RequestManager manager
           
static int NOT_IDEMPOTENT
           
private  int requestCounter
           
private  java.util.Hashtable requests
           
private static long serialVersionUID
           
 
Constructor Summary
HARequestManager()
           
 
Method Summary
 void agentFinalize(boolean lastTime)
           
 void agentInitialize(boolean firstTime)
           
(package private)  void doReact(GetRequestIdNot not)
           
(package private)  void doReact(TcpRequestNot not)
           
 void readBag(java.io.ObjectInputStream in)
          The readBag method is responsible for reading from the stream and restoring the agent's transient state.
(package private)  void removeContext(int id)
           
private  void saveRequestCounter()
           
 void setRequestManager(RequestManager manager)
           
 void writeBag(java.io.ObjectOutputStream out)
          The writeBag method is responsible for writing the extra data of this particular agent so that the corresponding readBag method can restore it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

IDEMPOTENT

public static final int IDEMPOTENT
See Also:
Constant Field Values

NOT_IDEMPOTENT

public static final int NOT_IDEMPOTENT
See Also:
Constant Field Values

HA_REQUEST_COUNTER

public static final java.lang.String HA_REQUEST_COUNTER
See Also:
Constant Field Values

requestCounter

private transient int requestCounter

requests

private transient java.util.Hashtable requests

manager

private RequestManager manager
Constructor Detail

HARequestManager

public HARequestManager()
Method Detail

setRequestManager

public void setRequestManager(RequestManager manager)

agentInitialize

public void agentInitialize(boolean firstTime)
                     throws java.lang.Exception
Specified by:
agentInitialize in interface LifeCycleListener
Throws:
java.lang.Exception

agentFinalize

public void agentFinalize(boolean lastTime)
Specified by:
agentFinalize in interface LifeCycleListener

doReact

void doReact(GetRequestIdNot not)

doReact

void doReact(TcpRequestNot not)
       throws java.lang.Exception
Throws:
java.lang.Exception

removeContext

void removeContext(int id)

saveRequestCounter

private void saveRequestCounter()

writeBag

public void writeBag(java.io.ObjectOutputStream out)
              throws java.io.IOException
Description copied from interface: BagSerializer
The writeBag method is responsible for writing the extra data of this particular agent so that the corresponding readBag method can restore it.

Specified by:
writeBag in interface BagSerializer
Throws:
java.io.IOException

readBag

public void readBag(java.io.ObjectInputStream in)
             throws java.io.IOException,
                    java.lang.ClassNotFoundException
Description copied from interface: BagSerializer
The readBag method is responsible for reading from the stream and restoring the agent's transient state.

Specified by:
readBag in interface BagSerializer
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.