Package com.sun.star.comp.connections
Class ConstantInstanceProvider
- java.lang.Object
-
- com.sun.star.comp.connections.ConstantInstanceProvider
-
- All Implemented Interfaces:
com.sun.star.bridge.XInstanceProvider
,com.sun.star.uno.XInterface
public class ConstantInstanceProvider extends java.lang.Object implements com.sun.star.bridge.XInstanceProvider
TheConstantInstanceProvider
is a component that implements theXInstanceProvider
Interface.- Since:
- UDK1.0
- See Also:
XBridge
,XBridgeFactory
,XInstanceProvider
,JavaLoader
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description ConstantInstanceProvider(com.sun.star.lang.XMultiServiceFactory serviceManager)
Constructs a newConstantInstanceProvider
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
When set to true, enables various debugging output.- See Also:
- Constant Field Values
-
_serviceManager
protected com.sun.star.lang.XMultiServiceFactory _serviceManager
-
_serviceName
protected java.lang.String _serviceName
-
_instance
protected java.lang.Object _instance
-
-
Method Detail
-
__getServiceFactory
public 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.This method is called by the
JavaLoader
.- Parameters:
implName
- the name of the implementation for which a service is desired.multiFactory
- the service manager to be uses if needed.regKey
- the registryKey.- Returns:
- returns a
XSingleServiceFactory
for creating the component. - See Also:
JavaLoader
-
setInstance
public void setInstance(java.lang.String serviceName) throws com.sun.star.uno.Exception
- Throws:
com.sun.star.uno.Exception
-
getInstance
public java.lang.Object getInstance(java.lang.String sInstanceName) throws com.sun.star.container.NoSuchElementException, com.sun.star.uno.RuntimeException
Gives an object for the passed instance name.- Specified by:
getInstance
in interfacecom.sun.star.bridge.XInstanceProvider
- Parameters:
sInstanceName
- the name of the desired instance- Returns:
- the desired instance
- Throws:
com.sun.star.container.NoSuchElementException
com.sun.star.uno.RuntimeException
-
-