Package com.sun.star.connection

Examples of com.sun.star.connection.XConnector.connect()


    smgr.addFactories(neededServices);

    XConnector  xConnector  = (XConnector)smgr.createInstance("com.sun.star.connection.Connector");
    if(xConnector == null) System.err.println("no connector!");

    XConnection xConn    = xConnector.connect("socket,host=localhost,port=6001");
    if(xConn == null) System.err.println("no XConnection!");

    IBridge iBridge = UnoRuntime.getBridgeByName("java", null, "remote", null, new Object[]{"iiop", xConn, null});

    Object rInitialObject = iBridge.mapInterfaceFrom("classic_uno", XInterface.class);
View Full Code Here


       
        XConnector xConnector =
          UnoRuntime.queryInterface( XConnector.class , x );
       
        XConnection xConnection = xConnector.connect(args[0]);
     
        if( null != xConnection )
        {
          System.out.println( "after connect" );
          String rootOid = "OfficeDaemon.Factory";
View Full Code Here

            XBridgeFactory factory = UnoRuntime.queryInterface(
                XBridgeFactory.class,
                context.getServiceManager().createInstanceWithContext(
                    "com.sun.star.bridge.BridgeFactory", context));
            System.out.println("Client: Connecting...");
            XConnection connection = connector.connect(connectionDescription);
            System.out.println("Client: ...connected...");
            XBridge bridge = factory.createBridge(
                "", protocolDescription, connection, null);
            System.out.println("Client: ...bridged.");
            return bridge;
View Full Code Here

            try {
                Thread.sleep(500);
            }
            catch (java.lang.InterruptedException e) {}

            XConnection con = xConnector.connect(connectString) ;

            if (con == null)
                log.println("Connector returned : null") ;
            else
                log.println("Connector returned : " + con.getDescription()) ;
View Full Code Here

            try {
                Thread.sleep(500);
            }
            catch (java.lang.InterruptedException e) {}
            conn = xCntr.connect(connectString) ;

        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log) ;
            throw new StatusException("Can't create connection", e);
        }
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());
        }
View Full Code Here

          "com.sun.star.connection.Connector", xRemoteContext);
        XConnector xConnector = (XConnector) UnoRuntime.queryInterface(XConnector.class, x);
        logger.debug("XConnector retrieved: " + xConnector);
            XConnection connection = null;
            try {
          connection = xConnector.connect("socket,host=" + host + ",port=" + port);
          if (connection == null) {
            logger.error("Cannot connect to open office using host " + host + " and port " + port);
            throw new OpenOfficeConnectionException("Cannot connect to open office using host " + host
                + " and port " + port);
          }
View Full Code Here

      Object x = xRemoteContext.getServiceManager().createInstanceWithContext(
        "com.sun.star.connection.Connector", xRemoteContext);
      XConnector xConnector = (XConnector) UnoRuntime.queryInterface(XConnector.class, x);
      logger.debug("XConnector retrieved: " + xConnector);
      XConnection connection = xConnector.connect("socket,host=" + host + ",port=" + port);
      logger.debug("XConnection retrieved: " + connection);
      x = xRemoteContext.getServiceManager().createInstanceWithContext("com.sun.star.bridge.BridgeFactory",
        xRemoteContext);
      XBridgeFactory xBridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(XBridgeFactory.class, x);
      logger.debug("XBridgeFactory retrieved: " + xBridgeFactory);
View Full Code Here

            {
                throw new com.sun.star.uno.Exception( "Couldn't parse uno-url "+ _url );
            }

            // connect using the connection string part of the uno-url only.
            XConnection connection = xConnector.connect( a[0] );
       
            x = _ctx.getServiceManager().createInstanceWithContext(
                "com.sun.star.bridge.BridgeFactory", _ctx );

            XBridgeFactory xBridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(
View Full Code Here

       {
            throw new com.sun.star.uno.Exception( "Couldn't parse uno-url "+ sConnectionString );
       }

       // connect using the connection string part of the uno-url only.
       m_Connection = xConnector.connect( a[0] );
       
       x = xComponentContext.getServiceManager().createInstanceWithContext(
                "com.sun.star.bridge.BridgeFactory", xComponentContext );

       XBridgeFactory xBridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(
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.