#include <Hash_Naming_Context.h>
Inheritance diagram for TAO_Hash_Naming_Context:
Public Methods | |
TAO_Hash_Naming_Context (PortableServer::POA_ptr poa, const char *poa_id) | |
Constructor. More... | |
virtual | ~TAO_Hash_Naming_Context (void) |
Destructor. More... | |
int | root (void) |
Returns true if this Naming Context is a root Naming Context for the server, and false otherwise. More... | |
int | destroyed (void) |
Returns true if this context had <destroy> operation invoked on it, and false otherwise. More... | |
virtual void | bind (const CosNaming::Name &n, CORBA::Object_ptr obj ACE_ENV_ARG_DECL) |
Create a binding for name <n> and object <obj> in the naming context. More... | |
virtual void | rebind (const CosNaming::Name &n, CORBA::Object_ptr obj ACE_ENV_ARG_DECL) |
This is similar to <bind> operation above, except for when the binding for the specified name already exists in the specified context. More... | |
virtual void | bind_context (const CosNaming::Name &n, CosNaming::NamingContext_ptr nc ACE_ENV_ARG_DECL) |
This is the version of <bind> specifically for binding naming contexts, so that they will participate in name resolution when compound names are passed to be resolved. More... | |
virtual void | rebind_context (const CosNaming::Name &n, CosNaming::NamingContext_ptr nc ACE_ENV_ARG_DECL) |
This is a version of <rebind> specifically for naming contexts, so that they can participate in name resolution when compound names are passed. More... | |
virtual CORBA::Object_ptr | resolve (const CosNaming::Name &n ACE_ENV_ARG_DECL) |
Return object reference that is bound to the name. More... | |
virtual void | unbind (const CosNaming::Name &n ACE_ENV_ARG_DECL) |
Remove the name binding from the context. More... | |
virtual CosNaming::NamingContext_ptr | bind_new_context (const CosNaming::Name &n ACE_ENV_ARG_DECL) |
This operation creates a new context and binds it to the name supplied as an argument. More... | |
virtual void | destroy (ACE_ENV_SINGLE_ARG_DECL) |
Delete the naming context. More... | |
virtual PortableServer::POA_ptr | _default_POA (void) |
Returns the Default POA of this Servant object. More... | |
Public Attributes | |
void interface TAO_Naming_Context * | i |
Set our <interface_> pointer. More... | |
TAO_Naming_Context *interface | void |
Get the pointer to our <interface>. More... | |
Protected Methods | |
CosNaming::NamingContext_ptr | get_context (const CosNaming::Name &name ACE_ENV_ARG_DECL) |
<get_context> is used by methods that need to resolve a compound name before performing the actual operation (e.g., bind, unbind, etc.) <get_context> takes a full name (including the last component that doesn't need to be resolved), and returns a pointer to the target context. More... | |
Protected Attributes | |
TAO_Bindings_Map * | context_ |
Pointer to the data structure used to store this Naming Context's bindings. More... | |
TAO_Naming_Context * | interface_ |
Pointer to the <interface> object for which we serve as a <concrete implementation>, i.e., the object that delegates to us all client CosNaming::NamingContext CORBA calls. More... | |
TAO_SYNCH_RECURSIVE_MUTEX | lock_ |
Lock used to serialize access to the underlying data structure. More... | |
int | destroyed_ |
Flag indicating whether this Naming Context is no longer valid. More... | |
PortableServer::POA_var | poa_ |
POA we are registered with. More... | |
ACE_CString | poa_id_ |
ID with which we are registered with <poa_>. More... |
This class contains 'algorithm' code that is common to two hash-table-based implementations of the NamingContext: TAO_Transient_Naming_Context and TAO_Persistent_Naming_Context. To help achieve this 'templatization', we use the abstract base class TAO_Bindings_Map, which provides a common interface to the data structures used in TAO_Persistent_Namng_Context and TAO_Transient_Naming_Context.
|
Constructor.
|
|
Destructor.
|
|
Returns the Default POA of this Servant object.
Reimplemented from TAO_Naming_Context_Impl. |
|
Create a binding for name <n> and object <obj> in the naming context. Compound names are treated as follows: ctx->bind (<c1; c2; c3; cn>, obj) = (ctx->resolve (<c1; c2; cn-1>))->bind (<cn>, obj) if the there already exists a binding for the specified name, <AlreadyBound> exception is thrown. Naming contexts should be bound using <bind_context> and <rebind_context> in order to participate in name resolution later. Reimplemented from TAO_Naming_Context_Impl. Reimplemented in TAO_Storable_Naming_Context. |
|
This is the version of <bind> specifically for binding naming contexts, so that they will participate in name resolution when compound names are passed to be resolved.
Reimplemented from TAO_Naming_Context_Impl. Reimplemented in TAO_Storable_Naming_Context. |
|
This operation creates a new context and binds it to the name supplied as an argument. The newly-created context is implemented by the same server as the context in which it was bound (the name argument excluding the last component). Reimplemented from TAO_Naming_Context_Impl. Reimplemented in TAO_Storable_Naming_Context. |
|
Delete the naming context. The user should take care to <unbind> any bindings in which the given context is bound to some names, to avoid dangling references when invoking <destroy> operation. NOTE: <destory> is a no-op on the root context. NOTE: after <destroy> is invoked on a Naming Context, all BindingIterators associated with that Naming Context are also destroyed. Reimplemented from TAO_Naming_Context_Impl. Reimplemented in TAO_Storable_Naming_Context. |
|
Returns true if this context had <destroy> operation invoked on it, and false otherwise.
|
|
<get_context> is used by methods that need to resolve a compound name before performing the actual operation (e.g., bind, unbind, etc.) <get_context> takes a full name (including the last component that doesn't need to be resolved), and returns a pointer to the target context.
|
|
This is similar to <bind> operation above, except for when the binding for the specified name already exists in the specified context. In that case, the existing binding is replaced with the new one. Reimplemented from TAO_Naming_Context_Impl. Reimplemented in TAO_Storable_Naming_Context. |
|
This is a version of <rebind> specifically for naming contexts, so that they can participate in name resolution when compound names are passed.
Reimplemented from TAO_Naming_Context_Impl. Reimplemented in TAO_Storable_Naming_Context. |
|
Return object reference that is bound to the name. Compound name resolve is defined as follows: ctx->resolve (<c1; c2; cn>) = ctx->resolve (<c1; c2 cn-1>)->resolve (<cn>) The naming service does not return the type of the object. Clients are responsible for "narrowing" the object to the appropriate type. Reimplemented from TAO_Naming_Context_Impl. Reimplemented in TAO_Storable_Naming_Context. |
|
Returns true if this Naming Context is a root Naming Context for the server, and false otherwise.
|
|
Remove the name binding from the context. When compound names are used, unbind is defined as follows: ctx->unbind (<c1; c2; cn>) = (ctx->resolve (<c1; c2; cn-1>))->unbind (<cn>) Reimplemented from TAO_Naming_Context_Impl. Reimplemented in TAO_Storable_Naming_Context. |
|
Pointer to the data structure used to store this Naming Context's bindings. <context_> is initialized with a concrete data structure by subclasses, which know which data structure to use. |
|
Flag indicating whether this Naming Context is no longer valid. This flag is necessary because immediate destruction might not be possible if there are pending requests on this servant in the POA. |
|
Set our <interface_> pointer.
|
|
Pointer to the <interface> object for which we serve as a <concrete implementation>, i.e., the object that delegates to us all client CosNaming::NamingContext CORBA calls. We need this pointer for reference counting. |
|
Lock used to serialize access to the underlying data structure.
|
|
POA we are registered with.
|
|
ID with which we are registered with <poa_>. Note, if <poa_id_> is equivalent to TAO_ROOT_NAMING_CONTEXT, then this Naming Context is the root Naming Context for the server, i.e., it is un<destroy>able. |
|
Get the pointer to our <interface>.
|