Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

upf::IServiceManager Interface Reference

import "IServiceManager.idl";

Inheritance diagram for upf::IServiceManager:

Inheritance graph
[legend]
List of all members.

Detailed Description

Service manager.

Service is simply a named object. It is registered into service manager under a name (similar to Unix filename) and can later be obtained (resolved) by anybody else.

This is the simplest way to implement singletons in UPF.

Note:
Service names beginning with "/upf/" are reserved to UPF and shall not be binded to by user apps (rebinding them is permitted, though).
Note:
Following services are always available:


Public Methods

boolean rebind (in string name, in IObject obj)
 Replaces the object providing service name with obj.

boolean unbind (in string name)
 Removes service name (i.e.

IObject resolve (in string name)
 Returns object that was binded to service name.

void addListener (in string name, in IServiceChangeListener listener)
 Add a listener that is notified when the object that provides service named name changes to another object (i.e.


Member Function Documentation

void upf::IServiceManager::addListener in string    name,
in IServiceChangeListener    listener
 

Add a listener that is notified when the object that provides service named name changes to another object (i.e.

bind or rebind was called) or when the service is removed (unbind was called).

See also:
IServiceChangeListener

boolean upf::IServiceManager::rebind in string    name,
in IObject    obj
 

Replaces the object providing service name with obj.

The service must be binded with rebind permissions, otherwise rebind fails and returns false.

See also:
bind, SERVICE_CAN_REBIND

IObject upf::IServiceManager::resolve in string    name
 

Returns object that was binded to service name.

Returns NULL if there is no such service.

boolean upf::IServiceManager::unbind in string    name
 

Removes service name (i.e.

it won't be possible to resolve it afterwards). The service must be binded with unbind permissions, otherwise unbind fails and returns false.

See also:
bind, SERVICE_CAN_UNBIND


Generated on Wed Jan 15 23:10:56 2003 for Universal Plugins Framework by doxygen1.2.18