public class ConstantInstanceProvider
extends java.lang.Object
implements com.sun.star.bridge.XInstanceProvider
ConstantInstanceProvider is a component
that implements the XInstanceProvider Interface.XBridge,
XBridgeFactory,
XInstanceProvider,
JavaLoader| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
_instance |
protected com.sun.star.lang.XMultiServiceFactory |
_serviceManager |
protected java.lang.String |
_serviceName |
static boolean |
DEBUG
When set to true, enables various debugging output.
|
| Constructor and Description |
|---|
ConstantInstanceProvider(com.sun.star.lang.XMultiServiceFactory serviceManager)
Constructs a new
ConstantInstanceProvider. |
| Modifier and Type | Method and Description |
|---|---|
static com.sun.star.lang.XSingleServiceFactory |
__getServiceFactory(java.lang.String implName,
com.sun.star.lang.XMultiServiceFactory multiFactory,
com.sun.star.registry.XRegistryKey regKey)
Gives a factory for creating the service.
|
java.lang.Object |
getInstance(java.lang.String sInstanceName)
Gives an object for the passed instance name.
|
void |
setInstance(java.lang.String serviceName) |
public static final boolean DEBUG
protected com.sun.star.lang.XMultiServiceFactory _serviceManager
protected java.lang.String _serviceName
protected java.lang.Object _instance
public ConstantInstanceProvider(com.sun.star.lang.XMultiServiceFactory serviceManager)
ConstantInstanceProvider.
Uses the provided ServiceManager as the provided instance.
serviceManager - the provided service managerpublic static com.sun.star.lang.XSingleServiceFactory __getServiceFactory(java.lang.String implName,
com.sun.star.lang.XMultiServiceFactory multiFactory,
com.sun.star.registry.XRegistryKey regKey)
This method is called by the JavaLoader.
implName - the name of the implementation for which a service is desired.multiFactory - the service manager to be uses if needed.regKey - the registryKey.XSingleServiceFactory for creating the component.JavaLoaderpublic void setInstance(java.lang.String serviceName)
throws com.sun.star.uno.Exception
com.sun.star.uno.Exceptionpublic java.lang.Object getInstance(java.lang.String sInstanceName)
throws com.sun.star.container.NoSuchElementException,
com.sun.star.uno.RuntimeException
getInstance in interface com.sun.star.bridge.XInstanceProvidersInstanceName - the name of the desired instancecom.sun.star.container.NoSuchElementExceptioncom.sun.star.uno.RuntimeException