ZeusBase-Library  2.0.4
zeus::INamedContext Class Referenceabstract

#include <INamedContext.hpp>

Inheritance diagram for zeus::INamedContext:
zeus::IZUnknown zeus::INaming zeus::TNamedContext zeus::TNamedContext_Stub zeus::TNaming

Public Member Functions

virtual Retval MQUALIFIER bind (const IString &rName, const IRemoteObject &rObject)=0
 
virtual Retval MQUALIFIER rebind (const IString &rName, const IRemoteObject &rObject)=0
 
virtual Retval MQUALIFIER unbind (const IString &rName)=0
 
virtual Retval MQUALIFIER lookup (const IString &rQuery, IRemoteObject *&rpObject)=0
 
virtual Retval MQUALIFIER lookupObjects (const IString &rQuery, IRemoteObjectList &rObjects)=0
 
virtual Retval MQUALIFIER lookupAny (const IString &rQuery, IRemoteObject *&rpObject)=0
 
virtual Retval MQUALIFIER getObjectNames (const IString &rQuery, IStringList &rNames)=0
 
- Public Member Functions inherited from zeus::IZUnknown
virtual Retval MQUALIFIER askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface)=0
 
virtual void MQUALIFIER addRef () const =0
 
virtual void MQUALIFIER release () const =0
 

Detailed Description

This interface defines the context of the naming service of the zeus- framework.

Member Function Documentation

§ bind()

virtual Retval MQUALIFIER zeus::INamedContext::bind ( const IString rName,
const IRemoteObject rObject 
)
pure virtual

Binds a name to an object, which can accessed from remote. If the name is already registered, this method fails. To rebind an existing object use the method rebind(). The object is added to a directory. If no path is specified, the object is added to the root directory of this context.
A valid path might be /rmi/test/myobject.

Parameters
rName: Path and name of the object
rObject: Object reference of the skeleton object
Return values
RET_NOERROR: Object bound
RET_REQUEST_FAILED: Could not bind object
RET_REMOTECALL_ERROR: Communication error with remote object

Implemented in zeus::TNaming, zeus::TNamedContext, and zeus::TNamedContext_Stub.

§ getObjectNames()

virtual Retval MQUALIFIER zeus::INamedContext::getObjectNames ( const IString rQuery,
IStringList rNames 
)
pure virtual

Gets a set of objects names registered for the same category

Parameters
rQuery: Query path
rNames: return parameter of all found objects names for this category
Return values
RET_NOERROR: Names has been returned
RET_REQUEST_FAILED: No entry found
RET_INTERNAL_ERROR: Registry has an error (not loaded)
RET_REMOTECALL_ERROR: Communication error with remote object

Implemented in zeus::TNaming, zeus::TNamedContext, and zeus::TNamedContext_Stub.

§ lookup()

virtual Retval MQUALIFIER zeus::INamedContext::lookup ( const IString rQuery,
IRemoteObject *&  rpObject 
)
pure virtual

Returns a remote object reference. The object must be referenced by a path and name. For instance "myobject" will return an object named "myobject" directly from the root, where as "//myobject" will return the first object found in root or some subdirectory (recursivly). The path must be a valid X-Object Path.

Parameters
rQuery: Path to the requested object
rpObject: return parameter of first object found
Return values
RET_NOERROR: Object has been returned
RET_REQUEST_FAILED: No entry found
RET_REMOTECALL_ERROR: Communication error with remote object
Note
To find more than one object, use the method lookupObjects()

Implemented in zeus::TNaming, zeus::TNamedContext, and zeus::TNamedContext_Stub.

§ lookupAny()

virtual Retval MQUALIFIER zeus::INamedContext::lookupAny ( const IString rQuery,
IRemoteObject *&  rpObject 
)
pure virtual

This method selects first all matching objects and then randomly returns one of them. This is useful if all the matching objects implement the same service.

Parameters
rQuery: Query of the requested objects
rpObject: return parameter of an object
Returns
Error codes see lookup()

Implemented in zeus::TNaming, zeus::TNamedContext, and zeus::TNamedContext_Stub.

§ lookupObjects()

virtual Retval MQUALIFIER zeus::INamedContext::lookupObjects ( const IString rQuery,
IRemoteObjectList rObjects 
)
pure virtual

This method acts basically like the lookup() method, but it returns a list of all matching objects.

Parameters
rQuery: Path to the requested objects
rObjects: return parameter of all objects found
Returns
Error codes see lookup()
Note
This method will return RET_NOERROR even the list is empty.

Implemented in zeus::TNaming, zeus::TNamedContext, and zeus::TNamedContext_Stub.

§ rebind()

virtual Retval MQUALIFIER zeus::INamedContext::rebind ( const IString rName,
const IRemoteObject rObject 
)
pure virtual

Rebinds a name to an object, which can be accessed from remote. If the object hasn't been bound before, this method acts like bind()

Parameters
rName: Path and name of the object
rObject: Object reference of the skeleton object
Return values
RET_NOERROR: Object bound
RET_REQUEST_FAILED: Could not rebind object
RET_REMOTECALL_ERROR: Communication error with remote object

Implemented in zeus::TNaming, zeus::TNamedContext, and zeus::TNamedContext_Stub.

§ unbind()

virtual Retval MQUALIFIER zeus::INamedContext::unbind ( const IString rName)
pure virtual

Removes an object from the context.

Parameters
rName: path and name of the object
Return values
RET_NOERROR: Object has been removed
RET_REQUEST_FAILED: Could not remove because the entry does not exist
RET_REMOTECALL_ERROR: Communication error with remote object

Implemented in zeus::TNaming, zeus::TNamedContext, and zeus::TNamedContext_Stub.


The documentation for this class was generated from the following file:


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Tue Sep 13 2016 22:31:35