Class 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 the XBridgeFactory Interface.

    It wraps the UnoRuntime#getBridgeByNamemethod 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, the JavaLoader accesses this through reflection.
      • Fields inherited from interface com.sun.star.bridge.XBridgeFactory

        UNOTYPEINFO
    • 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 under sName.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • __serviceName

        public static final java.lang.String __serviceName
        The name of the service, the JavaLoader accesses this through reflection.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BridgeFactory

        public BridgeFactory()
    • 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 under sName.
        Specified by:
        createBridge in interface com.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 interface com.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 interface com.sun.star.bridge.XBridgeFactory
        Returns:
        the bridges.
        Throws:
        com.sun.star.uno.RuntimeException
        See Also:
        XBridgeFactory