fr.dyade.aaa.jndi2.server

Class RequestManager

Implemented Interfaces:
LifeCycleListener, java.io.Serializable
Known Direct Subclasses:
ReplicationManager

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

See Also:
Serialized Form

Method Summary

void
agentFinalize(boolean lastTime)
void
agentInitialize(boolean firstTime)
protected void
changeOwner(ChangeOwnerRequest request)
protected void
createSubcontext(CreateSubcontextRequest request)
AgentId
getId()
protected AgentId
getRootOwnerId()
Returns the root naming context owner identifier.
protected ServerImpl
getServerImpl()
JndiReply
invoke(RequestContext reqCtx)
protected JndiReply
invokeAdminRequest(RequestContext reqCtx)
protected JndiReply
invokeOwner(AgentId owner, RequestContext reqCtx)
A centralized JNDI server returns a JNDI error explaining that this server is not the owner of the context on which the JNDI operation is called.
protected JndiReply
invokeReadRequest(RequestContext reqCtx)
protected JndiReply
invokeWriteRequest(RequestContext reqCtx)
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
readBag(ObjectInputStream in)
void
sendTo(AgentId to, Notification not)
void
setContainer(Container container)
void
writeBag(ObjectOutputStream out)

Method Details

agentFinalize

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


agentInitialize

public void agentInitialize(boolean firstTime)
            throws Exception
Specified by:
agentInitialize in interface LifeCycleListener


changeOwner

protected void changeOwner(ChangeOwnerRequest request)
            throws NamingException


createSubcontext

protected void createSubcontext(CreateSubcontextRequest request)
            throws NamingException


getId

public final AgentId getId()


getRootOwnerId

protected AgentId getRootOwnerId()
Returns the root naming context owner identifier. May be overridden by a subclass.


getServerImpl

protected final ServerImpl getServerImpl()


invoke

public JndiReply invoke(RequestContext reqCtx)


invokeAdminRequest

protected JndiReply invokeAdminRequest(RequestContext reqCtx)
            throws NamingException


invokeOwner

protected JndiReply invokeOwner(AgentId owner,
                                RequestContext reqCtx)
A centralized JNDI server returns a JNDI error explaining that this server is not the owner of the context on which the JNDI operation is called. A subclass may override this behavior in order to invoke the owner of the naming context.

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.


invokeReadRequest

protected JndiReply invokeReadRequest(RequestContext reqCtx)
            throws NamingException


invokeWriteRequest

protected JndiReply invokeWriteRequest(RequestContext reqCtx)
            throws NamingException


onMissingContext

protected JndiReply onMissingContext(MissingContextException mce,
                                     RequestContext reqCtx)
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.

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)
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.

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.


readBag

public void readBag(ObjectInputStream in)
            throws IOException,
                   ClassNotFoundException


sendTo

public void sendTo(AgentId to,
                   Notification not)


setContainer

public void setContainer(Container container)


writeBag

public void writeBag(ObjectOutputStream out)
            throws IOException


Copyright B) 2004 Scalagent - All rights reserved