Package com.sun.star.bridge

Examples of com.sun.star.bridge.XBridgeFactory.createBridge()


            XBridgeFactory factory = UnoRuntime.queryInterface(
                XBridgeFactory.class,
                context.getServiceManager().createInstanceWithContext(
                    "com.sun.star.bridge.BridgeFactory", context));
            return !UnoRuntime.areSame(
                factory.createBridge(
                    "", getProtocolDescription(), connection, null),
                factory.createBridge(
                    "", getProtocolDescription(), connection, null));
        }
    }
View Full Code Here


                context.getServiceManager().createInstanceWithContext(
                    "com.sun.star.bridge.BridgeFactory", context));
            return !UnoRuntime.areSame(
                factory.createBridge(
                    "", getProtocolDescription(), connection, null),
                factory.createBridge(
                    "", getProtocolDescription(), connection, null));
        }
    }

    private static final class Provider implements XInstanceProvider {
View Full Code Here

                    XBridgeFactory.class,
                    serviceManager.createInstanceWithContext(
                        "com.sun.star.bridge.BridgeFactory", context));
            XConnection connection = Acceptor.create(context).accept(
                CONNECTION_DESCRIPTION);
            bridgeFactory.createBridge(
                "", PROTOCOL_DESCRIPTION, connection,
                new XInstanceProvider() {
                    public Object getInstance(String instanceName) {
                        return instance;
                    }
View Full Code Here

           
            XBridgeFactory xBridgeFactory = UnoRuntime.queryInterface(
                XBridgeFactory.class,
                smgr.createInstanceWithContext("com.sun.star.bridge.BridgeFactory",ctx));
           
            XBridge xBridge = xBridgeFactory.createBridge(
                "", protDcp, xConnection, new InstanceProvider(ctx));

            if (singleaccept) {
                Listener listener = new Listener();
                UnoRuntime.queryInterface(XComponent.class, xBridge).
View Full Code Here

        }
        new Thread() {
            public void run() {
                try {
                    // Use "127.0.0.1" instead of "localhost", see #i32281#:
                    factory.createBridge(
                        "", "urp",
                        acceptor.accept("socket,host=127.0.0.1,port=3831"),
                        new XInstanceProvider() {
                            public Object getInstance(String instanceName) {
                                return Relay.this;
View Full Code Here

        XConnector connector_xConnector = UnoRuntime.queryInterface(XConnector.class, connector);
       
        // connect to the server
        XConnection xConnection = connector_xConnector.connect(conDcp);
        try {
          xBridge = xBridgeFactory.createBridge(conDcp + ";" + protDcp, protDcp, xConnection, null);
        } catch (com.sun.star.bridge.BridgeExistsException e) {
          throw new com.sun.star.uno.RuntimeException(e.getMessage());
        }
      }
      rootObject = xBridge.getInstance(rootOid);
View Full Code Here

        x = xRemoteContext.getServiceManager().createInstanceWithContext("com.sun.star.bridge.BridgeFactory",
          xRemoteContext);
        XBridgeFactory xBridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(XBridgeFactory.class, x);
        logger.debug("XBridgeFactory retrieved: " + xBridgeFactory);
        // this is the bridge that you will dispose
        bridge = xBridgeFactory.createBridge("", "urp", connection, null);
        logger.debug("XBridge retrieved: " + bridge);
        XComponent xComp = (XComponent) UnoRuntime.queryInterface(XComponent.class, bridge);
        // get the remote instance
        x = bridge.getInstance("StarOffice.ServiceManager");
        logger.debug("StarOffice.ServiceManager instance retrieved: " + x);
View Full Code Here

      x = xRemoteContext.getServiceManager().createInstanceWithContext("com.sun.star.bridge.BridgeFactory",
        xRemoteContext);
      XBridgeFactory xBridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(XBridgeFactory.class, x);
      logger.debug("XBridgeFactory retrieved: " + xBridgeFactory);
      // this is the bridge that you will dispose
      bridge = xBridgeFactory.createBridge("", "urp", connection, null);
      logger.debug("XBridge retrieved: " + bridge);
      XComponent xComp = (XComponent) UnoRuntime.queryInterface(XComponent.class, bridge);
      // get the remote instance
      x = bridge.getInstance("StarOffice.ServiceManager");
      logger.debug("StarOffice.ServiceManager instance retrieved: " + x);
View Full Code Here

            XBridgeFactory xBridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(
                XBridgeFactory.class , x );

            // create a nameless bridge with no instance provider
            // using the middle part of the uno-url
            XBridge bridge = xBridgeFactory.createBridge( "" , a[1] , connection , null );

            // query for the XComponent interface and add this as event listener
            XComponent xComponent = (XComponent) UnoRuntime.queryInterface(
                XComponent.class, bridge );
            xComponent.addEventListener( this );
View Full Code Here

       XBridgeFactory xBridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(
                XBridgeFactory.class , x );

       // create a nameless bridge with no instance provider
       // using the middle part of the uno-url
       XBridge bridge = xBridgeFactory.createBridge( "" , a[1] , m_Connection , null );

       // query for the XComponent interface and add this as event listener
       XComponent xComponent = (XComponent) UnoRuntime.queryInterface(
                XComponent.class, bridge );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.