fr.dyade.aaa.jndi2.distributed
Class ReplicationManager

java.lang.Object
  extended byfr.dyade.aaa.jndi2.server.RequestManager
      extended byfr.dyade.aaa.jndi2.distributed.ReplicationManager
All Implemented Interfaces:
LifeCycleListener, java.io.Serializable, UpdateListener

public class ReplicationManager
extends RequestManager
implements UpdateListener

See Also:
Serialized Form

Field Summary
static java.lang.String INIT_REQUEST_TABLE
           
static java.lang.String SERVER_LIST
           
static java.lang.String SYNC_REQUEST_TABLE
           
static java.lang.String WRITE_REQUEST_TABLE
           
 
Constructor Summary
ReplicationManager(short[] serverIds)
           
 
Method Summary
 void agentInitialize(boolean firstTime)
           
protected  void changeOwner(ChangeOwnerRequest request)
           
protected  void createSubcontext(CreateSubcontextRequest request)
           
protected  AgentId getRootOwnerId()
          Overrides the JndiServer behavior.
protected  JndiReply invokeOwner(AgentId owner, RequestContext reqCtx)
          Overrides the JndiServer behavior.
protected  JndiReply onMissingContext(MissingContextException mce, RequestContext reqCtx)
          In a centralized JNDI server a missing context shows that the naming data are unconsistent.
protected  JndiReply onMissingRecord(MissingRecordException mre, RequestContext reqCtx)
          In a centralized JNDI server a missing record shows that the name asked by the JNDI request doesn't exist.
 void onUpdate(UpdateEvent event)
           
 
Methods inherited from class fr.dyade.aaa.jndi2.server.RequestManager
agentFinalize, getId, getServerImpl, invoke, invokeAdminRequest, invokeReadRequest, invokeWriteRequest, readBag, sendTo, setContainer, writeBag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INIT_REQUEST_TABLE

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

SYNC_REQUEST_TABLE

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

WRITE_REQUEST_TABLE

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

SERVER_LIST

public static final java.lang.String SERVER_LIST
See Also:
Constant Field Values
Constructor Detail

ReplicationManager

public ReplicationManager(short[] serverIds)
Method Detail

getRootOwnerId

protected AgentId getRootOwnerId()
Overrides the JndiServer behavior.

Overrides:
getRootOwnerId in class RequestManager

agentInitialize

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

invokeOwner

protected JndiReply invokeOwner(AgentId owner,
                                RequestContext reqCtx)
Overrides the JndiServer behavior. Send a JNDI request to the owner (JNDI server). Waits for the asynchronous reply.

Overrides:
invokeOwner in class RequestManager
Parameters:
owner - the identifier of the naming server that owns the naming context on which the JNDI operation is called.
reqCtx - the JNDI request context that raised the exception.
Returns:
the JNDI reply. May be null if the owner invocation is asynchronous.

onMissingContext

protected JndiReply onMissingContext(MissingContextException mce,
                                     RequestContext reqCtx)
Description copied from class: RequestManager
In a centralized JNDI server a missing context shows that the naming data are unconsistent. So it throws an error. A subclass may override this behavior in order to try to resolve the missing context.

Overrides:
onMissingContext in class RequestManager
Parameters:
mce - the missing context exception
reqCtx - the JNDI request context that raised the exception.
Returns:
the JNDI reply. May be null if the resolution is asynchronous.

onMissingRecord

protected JndiReply onMissingRecord(MissingRecordException mre,
                                    RequestContext reqCtx)
Description copied from class: RequestManager
In a centralized JNDI server a missing record shows that the name asked by the JNDI request doesn't exist. So the NameNotFoundException is directly forwarded to the client. A subclass may override this behavior in order to try to resolve the missing record.

Overrides:
onMissingRecord in class RequestManager
Parameters:
mre - the missing context exception
reqCtx - the JNDI request context that raised the exception.
Returns:
the JNDI reply. May be null if the resolution is asynchronous.

onUpdate

public void onUpdate(UpdateEvent event)
Specified by:
onUpdate in interface UpdateListener

createSubcontext

protected void createSubcontext(CreateSubcontextRequest request)
                         throws javax.naming.NamingException
Overrides:
createSubcontext in class RequestManager
Throws:
javax.naming.NamingException

changeOwner

protected void changeOwner(ChangeOwnerRequest request)
                    throws javax.naming.NamingException
Overrides:
changeOwner in class RequestManager
Throws:
javax.naming.NamingException


Copyright ? 2004 Scalagent - All rights reserved