Public Member Functions | Protected Member Functions

zeus::TNamedContext_Stub Class Reference

#include <NamedContext_Stub.h>

Inheritance diagram for zeus::TNamedContext_Stub:
zeus::TAbstractStub zeus::INamedContext zeus::TZObject zeus::IRemoteObjectStub zeus::IZUnknown zeus::IZUnknown zeus::IRemoteObject zeus::IZUnknown

List of all members.

Public Member Functions

 TNamedContext_Stub ()
virtual Retval MQUALIFIER bind (const IString &rName, const IRemoteObject &rObject)
virtual Retval MQUALIFIER rebind (const IString &rName, const IRemoteObject &rObject)
virtual Retval MQUALIFIER unbind (const IString &rName)
virtual Retval MQUALIFIER lookup (const IString &rQuery, IRemoteObject *&rpObject)
virtual Retval MQUALIFIER lookupObjects (const IString &rQuery, IRemoteObjectList &rObjects)
virtual Retval MQUALIFIER lookupAny (const IString &rQuery, IRemoteObject *&rpObject)
virtual Retval MQUALIFIER getObjectNames (const IString &rQuery, IStringList &rNames)
virtual Retval MQUALIFIER askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface)
virtual void MQUALIFIER addRef () const
virtual void MQUALIFIER release () const
 STUB_CLASS_DECL (TNamedContext_Stub,"TNamedContext_Stub")

Protected Member Functions

virtual ~TNamedContext_Stub ()

Constructor & Destructor Documentation

TNamedContext_Stub::TNamedContext_Stub (  )
TNamedContext_Stub::~TNamedContext_Stub (  ) [protected, virtual]

Member Function Documentation

virtual void MQUALIFIER zeus::TNamedContext_Stub::addRef (  ) const [virtual]
See also:
IZUnknown::addRef

Reimplemented from zeus::TAbstractStub.

virtual Retval MQUALIFIER zeus::TNamedContext_Stub::askForInterface ( const InterfaceID rInterfaceID,
IZUnknown *&  rpIface 
) [virtual]
See also:
IZUnknown::askForInterface

Reimplemented from zeus::TAbstractStub.

Retval MQUALIFIER TNamedContext_Stub::bind ( const IString rName,
const IRemoteObject rObject 
) [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

Implements zeus::INamedContext.

Retval MQUALIFIER TNamedContext_Stub::getObjectNames ( const IString rQuery,
IStringList rNames 
) [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

Implements zeus::INamedContext.

Retval MQUALIFIER TNamedContext_Stub::lookup ( const IString rQuery,
IRemoteObject *&  rpObject 
) [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()

Implements zeus::INamedContext.

Retval MQUALIFIER TNamedContext_Stub::lookupAny ( const IString rQuery,
IRemoteObject *&  rpObject 
) [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()

Implements zeus::INamedContext.

Retval MQUALIFIER TNamedContext_Stub::lookupObjects ( const IString rQuery,
IRemoteObjectList &  rObjects 
) [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.

Implements zeus::INamedContext.

Retval MQUALIFIER TNamedContext_Stub::rebind ( const IString rName,
const IRemoteObject rObject 
) [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

Implements zeus::INamedContext.

virtual void MQUALIFIER zeus::TNamedContext_Stub::release (  ) const [virtual]
See also:
IZUnknown::release

Reimplemented from zeus::TAbstractStub.

zeus::TNamedContext_Stub::STUB_CLASS_DECL ( TNamedContext_Stub  ,
"TNamedContext_Stub"   
)
Retval MQUALIFIER TNamedContext_Stub::unbind ( const IString rName ) [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

Implements zeus::INamedContext.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:31