service ServiceManager in module com::sun::star::lang::

(Global Index)

Syntax

service ServiceManager;

Description

provides a collection of implementations for services.

The factories are accessed with a service name. It is possible to access the factories with their implementation names, but you should avoid this.

The interfaces added through the XSet interfaces should support the following interfaces:

XServiceInfo
is used to support access through the implementation with service names.
XSingleServiceFactory (optional)
is used to instanciate components from the implementation.
XPropertySet (optional)
offers additional information on the implementation.
XComponent (optional)
The service manager calls the method XComponent::dispose on the registered factories. The service manager adds a listener to this factory. The factory is automatically revoked when the disposing listener is notified.

Included Services


com::sun::star::lang::MultiServiceFactory

Exported Interfaces


com::sun::star::lang::XComponent

Description

Normally you should call the method XComponent::dispose at the service manager just before the application terminates.

The service manager first broadcasts the XEventListener::disposing() message to all registered listeners. In this state you can still get all factories from the service manager, but it is not possible to add disposing listeners. Second the service manager calls XComponent::dispose at all registered factories that implement XComponent . In this second state the service manager does not provide any factory. This is called a two-phase shut down.


com::sun::star::container::XSet

Description

The implementations are managed with this interface. The supported services ( XServiceInfo is used) are registered automatically.


com::sun::star::container::XContentEnumerationAccess

Description

It is possible to enumerate all implementations that support the service specified with the argument of the XContentEnumerationAccess::createContentEnumeration method.

The enumerator returns interfaces. The type of interfaces are not specified. Normally these are XSingleServiceFactory .


com::sun::star::lang::XMultiServiceFactory

Description

Use a service name or an implementation name to instanciate a component with this interface.

First the service manager gets the factory registered under the service name. Then XMultiServiceFactory::createInstance or XMultiServiceFactory::createInstanceWithArguments of this factory is called.


com::sun::star::lang::XServiceInfo

Description

Services should always support this interface. For a RegistryServiceManager , at least the service "com.sun.star.lang.RegistryServiceManager" must be supported.

Top of Page