fr.dyade.aaa.jndi2.impl
Class ServerImpl

java.lang.Object
  extended byfr.dyade.aaa.jndi2.impl.ServerImpl

public class ServerImpl
extends java.lang.Object


Constructor Summary
ServerImpl(Transaction transaction, java.lang.Object serverId, java.lang.Object rootOwnerId)
          Constructs a ServerImpl
 
Method Summary
 void addNamingContext(NamingContextInfo ncInfo)
           
 void bind(javax.naming.CompositeName path, java.lang.Object obj)
          Binds an object to the specified path.
 void bind(NamingContext nc, java.lang.String lastName, java.lang.Object obj, java.lang.Object ownerId)
           
 void changeOwner(java.lang.Object formerOwnerId)
           
 NamingContextInfo[] copyNamingContexts(java.lang.Object serverId)
          Returns copies of the naming contexts owned by the server which identifier is specified.
 void createSubcontext(javax.naming.CompositeName path)
           
 void createSubcontext(javax.naming.CompositeName path, java.lang.Object subcontextOwnerId)
          Create a subcontext.
 NamingContextId createSubcontext(NamingContext parentNc, java.lang.String lastName, javax.naming.CompositeName path, NamingContextId ncid, java.lang.Object subcontextOwnerId, java.lang.Object ownerId)
           
 void destroySubcontext(javax.naming.CompositeName path)
          Destroy a subcontext.
 boolean destroySubcontext(NamingContext parentNc, java.lang.String lastName, javax.naming.CompositeName path, java.lang.Object ownerId)
           
 NamingContext getNamingContext(NamingContextId ncid)
           
 void initialize()
           
 javax.naming.NameClassPair[] list(javax.naming.CompositeName path)
           
 javax.naming.Binding[] listBindings(javax.naming.CompositeName path)
           
 Record lookup(javax.naming.CompositeName path)
          Looks up the specified path.
 void readBag(java.io.ObjectInputStream in)
           
 void rebind(javax.naming.CompositeName path, java.lang.Object obj)
          Rebinds an object to the specified path.
 void rebind(NamingContext nc, java.lang.String lastName, java.lang.Object obj, java.lang.Object ownerId)
           
 void resetNamingContext(NamingContext context)
           
 void setUpdateListener(UpdateListener updateListener)
           
 void unbind(javax.naming.CompositeName path)
          Unbinds the specified path.
 boolean unbind(NamingContext nc, java.lang.String lastName, java.lang.Object ownerId)
           
 void writeBag(java.io.ObjectOutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerImpl

public ServerImpl(Transaction transaction,
                  java.lang.Object serverId,
                  java.lang.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 Detail

setUpdateListener

public void setUpdateListener(UpdateListener updateListener)

initialize

public void initialize()
                throws java.lang.Exception
Throws:
java.lang.Exception

bind

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

Parameters:
path - the path of the object
obj - the object to bind
Throws:
javax.naming.NameAlreadyBoundException - if the name of the subcontext is already bound.
javax.naming.NameNotFoundException - if some of the intermediate names in the path don't exist.
NotOwnerException - if the owner of the parent context is checked and is not the local naming server.
javax.naming.NamingException

bind

public void bind(NamingContext nc,
                 java.lang.String lastName,
                 java.lang.Object obj,
                 java.lang.Object ownerId)
          throws javax.naming.NamingException
Throws:
javax.naming.NamingException

rebind

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

Parameters:
path - the path of the object
obj - the object to rebind
Throws:
javax.naming.NameNotFoundException - if some of the intermediate names in the path don't exist.
NotOwnerException - if the owner of the parent context is checked and is not the local naming server.
javax.naming.NamingException - if the specified path is bound to a naming context.

rebind

public void rebind(NamingContext nc,
                   java.lang.String lastName,
                   java.lang.Object obj,
                   java.lang.Object ownerId)
            throws javax.naming.NamingException
Throws:
javax.naming.NamingException

lookup

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

Parameters:
path - the path to look up
Returns:
null if the bound object is a context.
Throws:
javax.naming.NameNotFoundException - if some of the names (intermediate and final) in the path don't exist.
NotOwnerException - if the owner of the parent context is checked and is not the local naming server.
javax.naming.NameNotFoundException
javax.naming.NamingException

unbind

public void unbind(javax.naming.CompositeName path)
            throws javax.naming.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
Throws:
javax.naming.NameNotFoundException - if some of the intermediate names in the path don't exist.
NotOwnerException - if the owner of the parent context is checked and is not the local naming server.
javax.naming.NamingException - if the specified path is bound to a naming context.

unbind

public boolean unbind(NamingContext nc,
                      java.lang.String lastName,
                      java.lang.Object ownerId)
               throws javax.naming.NamingException
Throws:
javax.naming.NamingException

list

public javax.naming.NameClassPair[] list(javax.naming.CompositeName path)
                                  throws javax.naming.NamingException
Throws:
javax.naming.NamingException

listBindings

public javax.naming.Binding[] listBindings(javax.naming.CompositeName path)
                                    throws javax.naming.NamingException
Throws:
javax.naming.NamingException

createSubcontext

public void createSubcontext(javax.naming.CompositeName path)
                      throws javax.naming.NamingException
Throws:
javax.naming.NamingException

createSubcontext

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

Parameters:
path - the path of the subcontext
Throws:
javax.naming.NameAlreadyBoundException - if the name of the subcontext is already bound.
javax.naming.NameNotFoundException - if some of the intermediate names in the path don't exist.
NotOwnerException - if the owner of the parent context is checked and is not the local naming server.
javax.naming.NamingException

createSubcontext

public NamingContextId createSubcontext(NamingContext parentNc,
                                        java.lang.String lastName,
                                        javax.naming.CompositeName path,
                                        NamingContextId ncid,
                                        java.lang.Object subcontextOwnerId,
                                        java.lang.Object ownerId)
                                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

destroySubcontext

public void destroySubcontext(javax.naming.CompositeName path)
                       throws javax.naming.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
Throws:
javax.naming.NameAlreadyBoundException - if the name of the subcontext is already bound.
javax.naming.NameNotFoundException - if some of the intermediate names in the path don't exist.
NotOwnerException - if the owner of the parent context is checked and is not the local naming server.
javax.naming.NotContextException - if the specified path isn't bound to a context.
javax.naming.NamingException

destroySubcontext

public boolean destroySubcontext(NamingContext parentNc,
                                 java.lang.String lastName,
                                 javax.naming.CompositeName path,
                                 java.lang.Object ownerId)
                          throws javax.naming.NamingException
Throws:
javax.naming.NamingException

copyNamingContexts

public NamingContextInfo[] copyNamingContexts(java.lang.Object serverId)
                                       throws javax.naming.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.
Throws:
javax.naming.NamingException

getNamingContext

public NamingContext getNamingContext(NamingContextId ncid)
                               throws javax.naming.NamingException
Throws:
javax.naming.NamingException

addNamingContext

public void addNamingContext(NamingContextInfo ncInfo)
                      throws javax.naming.NamingException
Throws:
javax.naming.NamingException

changeOwner

public void changeOwner(java.lang.Object formerOwnerId)
                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

resetNamingContext

public void resetNamingContext(NamingContext context)
                        throws javax.naming.NamingException
Throws:
javax.naming.NamingException

writeBag

public void writeBag(java.io.ObjectOutputStream out)
              throws java.io.IOException
Throws:
java.io.IOException

readBag

public void readBag(java.io.ObjectInputStream in)
             throws java.io.IOException,
                    java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright ? 2004 Scalagent - All rights reserved