fr.dyade.aaa.jndi2.impl

Class ServerImpl


public class ServerImpl
extends java.lang.Object

Constructor Summary

ServerImpl(Transaction transaction, Object serverId, Object rootOwnerId)
Constructs a ServerImpl

Method Summary

void
addNamingContext(NamingContextInfo ncInfo)
void
bind(CompositeName path, Object obj)
Binds an object to the specified path.
void
bind(NamingContext nc, String lastName, Object obj, Object ownerId)
void
changeOwner(Object formerOwnerId)
NamingContextInfo[]
copyNamingContexts(Object serverId)
Returns copies of the naming contexts owned by the server which identifier is specified.
void
createSubcontext(CompositeName path)
void
createSubcontext(CompositeName path, Object subcontextOwnerId)
Create a subcontext.
NamingContextId
createSubcontext(NamingContext parentNc, String lastName, CompositeName path, NamingContextId ncid, Object subcontextOwnerId, Object ownerId)
void
destroySubcontext(CompositeName path)
Destroy a subcontext.
boolean
destroySubcontext(NamingContext parentNc, String lastName, CompositeName path, Object ownerId)
NamingContext
getNamingContext(NamingContextId ncid)
void
initialize()
NameClassPair[]
list(CompositeName path)
Binding[]
listBindings(CompositeName path)
Record
lookup(CompositeName path)
Looks up the specified path.
void
readBag(ObjectInputStream in)
void
rebind(CompositeName path, Object obj)
Rebinds an object to the specified path.
void
rebind(NamingContext nc, String lastName, Object obj, Object ownerId)
void
resetNamingContext(NamingContext context)
void
setUpdateListener(UpdateListener updateListener)
void
unbind(CompositeName path)
Unbinds the specified path.
boolean
unbind(NamingContext nc, String lastName, Object ownerId)
void
writeBag(ObjectOutputStream out)

Constructor Details

ServerImpl

public ServerImpl(Transaction transaction,
                  Object serverId,
                  Object rootOwnerId)
Constructs a ServerImpl

Parameters:
transaction - Transactional context that provides atomicity for the write operations performed during a request.
serverId - Identifier of this server.
rootOwnerId - Identifier of the server that owns the root naming context.

Method Details

addNamingContext

public void addNamingContext(NamingContextInfo ncInfo)
            throws NamingException


bind

public void bind(CompositeName path,
                 Object obj)
            throws NamingException
Binds an object to the specified path.

Parameters:
path - the path of the object
obj - the object to bind


bind

public void bind(NamingContext nc,
                 String lastName,
                 Object obj,
                 Object ownerId)
            throws NamingException


changeOwner

public void changeOwner(Object formerOwnerId)
            throws NamingException


copyNamingContexts

public NamingContextInfo[] copyNamingContexts(Object serverId)
            throws NamingException
Returns copies of the naming contexts owned by the server which identifier is specified.

Parameters:
serverId - the identifier of the server that owns the naming contexts to get.


createSubcontext

public void createSubcontext(CompositeName path)
            throws NamingException


createSubcontext

public void createSubcontext(CompositeName path,
                             Object subcontextOwnerId)
            throws NamingException
Create a subcontext.

Parameters:
path - the path of the subcontext


createSubcontext

public NamingContextId createSubcontext(NamingContext parentNc,
                                        String lastName,
                                        CompositeName path,
                                        NamingContextId ncid,
                                        Object subcontextOwnerId,
                                        Object ownerId)
            throws NamingException


destroySubcontext

public void destroySubcontext(CompositeName path)
            throws NamingException
Destroy a subcontext. This operation is idempotent: does nothing if the final name of the path is not found.

Parameters:
path - the path of the subcontext


destroySubcontext

public boolean destroySubcontext(NamingContext parentNc,
                                 String lastName,
                                 CompositeName path,
                                 Object ownerId)
            throws NamingException


getNamingContext

public NamingContext getNamingContext(NamingContextId ncid)
            throws NamingException


initialize

public void initialize()
            throws Exception


list

public NameClassPair[] list(CompositeName path)
            throws NamingException


listBindings

public Binding[] listBindings(CompositeName path)
            throws NamingException


lookup

public Record lookup(CompositeName path)
            throws NamingException
Looks up the specified path.

Parameters:
path - the path to look up

Returns:
null if the bound object is a context.


readBag

public void readBag(ObjectInputStream in)
            throws IOException,
                   ClassNotFoundException


rebind

public void rebind(CompositeName path,
                   Object obj)
            throws NamingException
Rebinds an object to the specified path.

Parameters:
path - the path of the object
obj - the object to rebind


rebind

public void rebind(NamingContext nc,
                   String lastName,
                   Object obj,
                   Object ownerId)
            throws NamingException


resetNamingContext

public void resetNamingContext(NamingContext context)
            throws NamingException


setUpdateListener

public void setUpdateListener(UpdateListener updateListener)


unbind

public void unbind(CompositeName path)
            throws NamingException
Unbinds the specified path. This operation is idempotent: does nothing if the final name of the path is not found.

Parameters:
path - the path to unbind


unbind

public boolean unbind(NamingContext nc,
                      String lastName,
                      Object ownerId)
            throws NamingException


writeBag

public void writeBag(ObjectOutputStream out)
            throws IOException


Copyright B) 2004 Scalagent - All rights reserved