Package com.sun.star.comp.bridgefactory
Class BridgeFactory
- java.lang.Object
-
- com.sun.star.comp.bridgefactory.BridgeFactory
-
- All Implemented Interfaces:
com.sun.star.bridge.XBridgeFactory
,com.sun.star.uno.XInterface
public class BridgeFactory extends java.lang.Object implements com.sun.star.bridge.XBridgeFactory
The BridgeFactory class implements theXBridgeFactory
Interface.It wraps the
UnoRuntime#getBridgeByName
method and delivers a XBridge component.This component is only usable for remote bridges.
- Since:
- UDK1.0
- See Also:
UnoRuntime
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
__serviceName
The name of the service, theJavaLoader
accesses this through reflection.
-
Constructor Summary
Constructors Constructor Description BridgeFactory()
-
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.com.sun.star.bridge.XBridge
createBridge(java.lang.String sName, java.lang.String sProtocol, com.sun.star.connection.XConnection aConnection, com.sun.star.bridge.XInstanceProvider anInstanceProvider)
Creates a remote bridge and memorizes it undersName
.com.sun.star.bridge.XBridge
getBridge(java.lang.String sName)
Gets a remote bridge which must already exist.com.sun.star.bridge.XBridge[]
getExistingBridges()
Gives all created bridges.
-
-
-
Field Detail
-
__serviceName
public static final java.lang.String __serviceName
The name of the service, theJavaLoader
accesses this through reflection.- See Also:
- Constant Field Values
-
-
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
-
createBridge
public com.sun.star.bridge.XBridge createBridge(java.lang.String sName, java.lang.String sProtocol, com.sun.star.connection.XConnection aConnection, com.sun.star.bridge.XInstanceProvider anInstanceProvider) throws com.sun.star.bridge.BridgeExistsException, com.sun.star.lang.IllegalArgumentException, com.sun.star.uno.RuntimeException
Creates a remote bridge and memorizes it undersName
.- Specified by:
createBridge
in interfacecom.sun.star.bridge.XBridgeFactory
- Parameters:
sName
- the name to memorize the bridge.sProtocol
- the protocol the bridge should use.anInstanceProvider
- the instance provider.- Returns:
- the bridge.
- Throws:
com.sun.star.bridge.BridgeExistsException
com.sun.star.lang.IllegalArgumentException
com.sun.star.uno.RuntimeException
- See Also:
XBridgeFactory
-
getBridge
public com.sun.star.bridge.XBridge getBridge(java.lang.String sName) throws com.sun.star.uno.RuntimeException
Gets a remote bridge which must already exist.- Specified by:
getBridge
in interfacecom.sun.star.bridge.XBridgeFactory
- Parameters:
sName
- the name of the bridge.- Returns:
- the bridge.
- Throws:
com.sun.star.uno.RuntimeException
- See Also:
XBridgeFactory
-
getExistingBridges
public com.sun.star.bridge.XBridge[] getExistingBridges() throws com.sun.star.uno.RuntimeException
Gives all created bridges.- Specified by:
getExistingBridges
in interfacecom.sun.star.bridge.XBridgeFactory
- Returns:
- the bridges.
- Throws:
com.sun.star.uno.RuntimeException
- See Also:
XBridgeFactory
-
-