Package com.sun.star.connection

Examples of com.sun.star.connection.XConnection


        }
       
        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


                if (i == adr.length - 1) {
                    throw new NoConnectException(e.toString());
                }
            }
        }
        XConnection con;
        try {
            if (desc.getTcpNoDelay() != null) {
                socket.setTcpNoDelay(desc.getTcpNoDelay().booleanValue());
            }
            con = new SocketConnection(connectionDescription, socket);
View Full Code Here

            throw new ConnectionSetupException("alread connected");
        }
 
  try
  {
    XConnection xConn = new PipeConnection( connectionDescription );
    bConnected = true;
    return xConn;
  }
  catch ( java.io.IOException e ) { throw new NoConnectException(); }
    }
View Full Code Here

     */
    public void run(){
        try {
            Thread.sleep(ConnectorImpl.iTimeout.intValue());
            ConnectorImpl.aState = "before connection";
            XConnection oConnection = oConnector.connect(connStr);
            if (oConnection != null) {
                ConnectorImpl.aState = "connected";
                oConnection.write(connStr.getBytes());
                oConnection.write(new byte[]{0});
            } else
                ConnectorImpl.aState = "XConnection is null";
        } catch (ConnectionSetupException e) {
            ConnectorImpl.aState = "ConnectionSetupException";
            throw new RuntimeException(e.toString());
View Full Code Here

//      try {
      com.sun.star.comp.servicemanager.ServiceManager smgr = new com.sun.star.comp.servicemanager.ServiceManager();
      smgr.addFactories(neededServices, null);

        XConnector  xConnector  = (XConnector)smgr.createInstance("com.sun.star.connection.Connector");
        XConnection xConnection = xConnector.connect(argv[0]);
     
      String rootOid = "classic_uno";
        IBridge iBridge = UnoRuntime.getBridgeByName("java", null, "remote", null, new Object[]{"iiop", xConnection, null});

      Object rInitialObject = iBridge.mapInterfaceFrom(rootOid, XInterface.class);
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

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

            // establish the connection
            XConnection xConnection = xCntr.connect(connectString);

            String protocol = "urp";
            String bridgeName = protocol + ":" + connectString;

/*            bridgeDisposed[0] = false ;
View Full Code Here

                } catch (com.sun.star.uno.Exception e) {
                    throw new com.sun.star.uno.RuntimeException(e.getMessage());
                }              
                XConnector connector_xConnector = (XConnector)UnoRuntime.queryInterface(XConnector.class, connector);
                // connect to the server
                XConnection xConnection = connector_xConnector.connect(conDcp);
                // create the bridge name. This should not be necessary if we pass an
                //empty string as bridge name into createBridge. Then we should always get
                //a new bridge. This does not work because of (i51323). Therefore we
                //create unique bridge names for the current process.
                String sBridgeName = "OOoBean_private_bridge_" + String.valueOf(m_nBridgeCounter++);
View Full Code Here

                               + connectionDescription + ")");
        }
        if (connected) {
            throw new ConnectionSetupException("already connected");
        }
        XConnection con
            = ((XConnector) Implementation.getConnectionService(
                   serviceFactory, connectionDescription, XConnector.class,
                   "Connector")).connect(connectionDescription);
        connected = true;
        return con;
View Full Code Here

                } catch (com.sun.star.uno.Exception e) {
                    throw new com.sun.star.uno.RuntimeException(e.getMessage());
                }              
                XConnector connector_xConnector = (XConnector)UnoRuntime.queryInterface(XConnector.class, connector);
                // connect to the server
                XConnection xConnection = connector_xConnector.connect(conDcp);
                // create the bridge name. This should not be necessary if we pass an
                //empty string as bridge name into createBridge. Then we should always get
                //a new bridge. This does not work because of (i51323). Therefore we
                //create unique bridge names for the current process.
                String sBridgeName = "OOoBean_private_bridge_" + String.valueOf(m_nBridgeCounter++);
View Full Code Here

TOP

Related Classes of com.sun.star.connection.XConnection

Copyright © 2018 www.massapicom. 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.