#include <Storable_Naming_Context.h>
Inheritance diagram for TAO_Storable_Naming_Context:
Public Types | |
typedef TAO_Storable_Bindings_Map::HASH_MAP | HASH_MAP |
Underlying data structure - typedef for ease of use. More... | |
Public Methods | |
TAO_Storable_Naming_Context (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, const char *poa_id, TAO_Naming_Service_Persistence_Factory *factory, const ACE_TCHAR *persistence_directory, size_t hash_table_size=ACE_DEFAULT_MAP_SIZE) | |
Constructor. More... | |
TAO_Storable_Naming_Context (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, const char *poa_id, TAO_Storable_Bindings_Map *bm, TAO_Naming_Service_Persistence_Factory *factory, const ACE_TCHAR *persistence_directory, size_t hash_table_size=ACE_DEFAULT_MAP_SIZE) | |
Constructor. More... | |
virtual | ~TAO_Storable_Naming_Context (void) |
Destructor. More... | |
virtual CosNaming::NamingContext_ptr | new_context (ACE_ENV_SINGLE_ARG_DECL) |
This operation returns a new naming context implemented by the same naming server in which the operation was invoked. More... | |
virtual void | list (CORBA::ULong how_many, CosNaming::BindingList_out &bl, CosNaming::BindingIterator_out &bi ACE_ENV_ARG_DECL) |
Returns at most the requested number of bindings <how_many> in <bl>. 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 (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 | 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... | |
Static Public Methods | |
CosNaming::NamingContext_ptr | make_new_context (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, const char *poa_id, size_t context_size, TAO_Naming_Service_Persistence_Factory *factory, const ACE_TCHAR *persistence_directory ACE_ENV_ARG_DECL) |
This utility method factors out the code needed to create a new Storable Naming Context servant and activate it under the specified POA with the specified id. More... | |
CosNaming::NamingContext_ptr | recreate_all (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, const char *poa_id, size_t context_size, int reentering, TAO_Naming_Service_Persistence_Factory *factory, const ACE_TCHAR *persistence_directory ACE_ENV_ARG_DECL) |
Protected Attributes | |
ACE_UINT32 | counter_ |
Counter used for generation of POA ids for children Naming Contexts. More... | |
TAO_Storable_Bindings_Map * | storable_context_ |
A pointer to the underlying data structure used to store name bindings. More... | |
CORBA::ORB_ptr | orb_ |
TAO_Naming_Service_Persistence_Factory * | factory_ |
ACE_CString | persistence_directory_ |
The directory in which to store the files. More... | |
Static Protected Attributes | |
CosNaming::NamingContext_ptr | root_context_ |
This class provides a implementation of the NamingContext functionality, i.e., the state can be preserved across process boundaries. Derives from TAO_Hash_Naming_Context and uses TAO_Storable_Bindings_Map to store name to object bindings.
|
Underlying data structure - typedef for ease of use.
|
|
Constructor.
|
|
Constructor.
|
|
Destructor.
|
|
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_Hash_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_Hash_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_Hash_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_Hash_Naming_Context. |
|
Returns at most the requested number of bindings <how_many> in <bl>. If the naming context contains additional bindings, they are returned with a BindingIterator. In the naming context does not contain any additional bindings <bi> returned as null. Reimplemented from TAO_Naming_Context_Impl. |
|
This utility method factors out the code needed to create a new Storable Naming Context servant and activate it under the specified POA with the specified id. This function is static so that the code can be used, both from inside the class (e.g., <new_context>), and from outside (e.g., Naming_Utils.cpp). |
|
This operation returns a new naming context implemented by the same naming server in which the operation was invoked. The context is not bound. Reimplemented from TAO_Naming_Context_Impl. |
|
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_Hash_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_Hash_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_Hash_Naming_Context. |
|
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_Hash_Naming_Context. |
|
Counter used for generation of POA ids for children Naming Contexts.
|
|
|
|
|
|
The directory in which to store the files.
|
|
|
|
A pointer to the underlying data structure used to store name bindings. While our superclass (TAO_Hash_Naming_Context) also maintains a pointer to the data structure, keeping this pointer around saves us from the need to downcast when invoking non-virtual methods. |