interface XMultiServiceFactory in module com::sun::star::lang::

(Global Index)

Syntax

interface XMultiServiceFactory : com::sun::star::uno::XInterface ;

Description

Factory objects support this interface for creating components by a specifying string, for example, the service name.

This specifying string is not necessarily a service name.

Example

  1. You want to load data from a location specified with a URL (file://..., http://..., ...).
  2. You get the factory that can create loader components.
  3. You call the XMultiServiceFactory::createInstance() method with arguments like "file", "http" or something else.
  4. The factory knows something about this string and specifies that
    • "file" means for example the service "com::sun::star::url::File"
    • "http" means for example the service "com::sun::star::url::Http"
    • "javascript" means for example the service "com::netscape::url::.JavaScript"
    or something else.
  5. Finally you start the download with start( URL ) at the newly created component.

See also

XInitialization

See also

XSingleServiceFactory

Method Summary

createInstance creates an instance of a component which supports the services specified by the factory.

createInstanceWithArguments creates an instance of a component which supports the services specified by the factory, and initializes the new object with given arguments.

getAvailableServiceNames

Method Details



createInstance

Syntax

com::sun::star::uno::XInterface createInstance (
string aServiceSpecifier )
raises ( com::sun::star::uno::Exception );

Description

creates an instance of a component which supports the services specified by the factory.


createInstanceWithArguments

Syntax

com::sun::star::uno::XInterface createInstanceWithArguments (
string ServiceSpecifier,
sequence< any > Arguments )
raises ( com::sun::star::uno::Exception );

Description

creates an instance of a component which supports the services specified by the factory, and initializes the new object with given arguments.

See also

XInitialization::init

getAvailableServiceNames

Syntax

sequence< string > getAvailableServiceNames ();

Description

Returns

a sequence of all service identifiers which can be instanciated.
Top of Page