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

service ServiceManager
Description
Provides a collection of implementations for services. This is a singleton you commonly find in your component context under key /singletons/com.sun.star.lang.theServiceManager .

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

Service factories added via ::com::sun::star::container::XSet should support the following interfaces:

::com::sun::star::lang::XServiceInfo
supported interfaces/ implementation name
::com::sun::star::lang::XSingleComponentFactory (optional)
is used to create instances of the implementation.
::com::sun::star::lang::XComponent (optional)
The service manager calls the method ::com::sun::star::lang::XComponent::dispose on the factory when going down (i.e. it is commonly disposed by the component context).
See also
::com::sun::star::uno::XComponentContext
Developers Guide

Included Services
::com::sun::star::lang::MultiServiceFactory
Description
This is a derived MultiServiceFactory service.
Exported Interfaces
::com::sun::star::lang::XComponent
Description
Disposing of service manager.

The component context disposes its service manager singleton when going down (i.e. when the component context is disposed).

::com::sun::star::container::XSet
Description
Management of service factories.
::com::sun::star::container::XContentEnumerationAccess
Description
Enumeration of all service factories.

It is possible to enumerate all implementations that support the service specified with the argument of the ::com::sun::star::container::XContentEnumerationAccess::createContentEnumeration method. The enumerator commonly returns ::com::sun::star::lang::XSingleComponentFactory interfaces.

::com::sun::star::beans::XPropertySet
Usage Restrictions
optional
Description
Property access.
Properties' Summary
::com::sun::star::uno::XComponentContext
DefaultContext
[ OPTIONAL ]
specifies the default component context to be used, if instanciating services via ::com::sun::star::lang::XMultiServiceFactory  
Properties' Details
DefaultContext
::com::sun::star::uno::XComponentContext DefaultContext;
Usage Restrictions
optional
Description
specifies the default component context to be used, if instanciating services via ::com::sun::star::lang::XMultiServiceFactory

 
Top of Page