Examples of IBridge


Examples of com.sun.star.uno.IBridge

        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);
//        Object rInitialObject = xBridge.getInstance("NamingService");
     
      if(rInitialObject != null) {
        System.err.println("got the remote object");
        doSomething(rInitialObject);
View Full Code Here

Examples of com.sun.star.uno.IBridge

    public String[] getTestMethodNames() {
        return new String[] { "test" };
    }

    public void test() throws Exception {
        IBridge iBridge = new TestBridge();
        PipedInputStream inA = new PipedInputStream();
        PipedOutputStream outA = new PipedOutputStream(inA);
        PipedInputStream inB = new PipedInputStream();
        PipedOutputStream outB = new PipedOutputStream(inB);
        Endpoint iSender = new Endpoint(iBridge, inA, outB);
        Endpoint iReceiver = new Endpoint(iBridge, inB, outA);

        TestObject testObject = new TestObject();
        String oId = (String)iBridge.mapInterfaceTo(testObject, new Type(XInterface.class));

        testCall(iSender, iReceiver, oId);
        testCallWithInParameter(iSender, iReceiver, oId);
        testCallWithOutParameter(iSender, iReceiver, oId);
        testCallWithInOutParameter(iSender, iReceiver, oId);
View Full Code Here

Examples of com.sun.star.uno.IBridge

            // sName.toString(), but the UnoRuntime bridge management is
            // obsolete anyway and should be removed

    // do not create a new bridge, if one already exists
        if (hasName) {
            IBridge iBridges[] = UnoRuntime.getBridges();
            for(int i = 0; i < iBridges.length; ++ i) {
                XBridge xBridge = (XBridge)UnoRuntime.queryInterface(XBridge.class, iBridges[i]);

                if(xBridge != null) {
                    if(xBridge.getName().equals(sName))
                        throw new BridgeExistsException(sName + " already exists");
                }
            }
        }

    XBridge xBridge = null;

    try {
      IBridge iBridge = UnoRuntime.getBridgeByName("java", context, "remote", context, hasName ? new Object[]{sProtocol, aConnection, anInstanceProvider, sName} : new Object[]{sProtocol, aConnection, anInstanceProvider});

      xBridge = (XBridge)UnoRuntime.queryInterface(XBridge.class, iBridge);
    }
    catch(Exception exception) {
      throw new com.sun.star.lang.IllegalArgumentException(exception.getMessage());
View Full Code Here

Examples of com.sun.star.uno.IBridge

   * @see                           com.sun.star.bridge.XBridgeFactory
   */
    public XBridge getBridge(String sName) throws com.sun.star.uno.RuntimeException {
    XBridge xBridge = null;

    IBridge iBridges[] = UnoRuntime.getBridges();
    for(int i = 0; i < iBridges.length; ++ i) {
      xBridge = (XBridge)UnoRuntime.queryInterface(XBridge.class, iBridges[i]);

      if(xBridge != null) {
        if(xBridge.getName().equals(sName))
View Full Code Here

Examples of com.sun.star.uno.IBridge

   * @see                           com.sun.star.bridge.XBridgeFactory
   */
    public synchronized XBridge[] getExistingBridges() throws com.sun.star.uno.RuntimeException {
    Vector vector = new Vector();

    IBridge iBridges[] = UnoRuntime.getBridges();
    for(int i = 0; i < iBridges.length; ++ i) {
      XBridge xBridge = (XBridge)UnoRuntime.queryInterface(XBridge.class, iBridges[i]);

      if(xBridge != null)
        vector.addElement(xBridge);
View Full Code Here

Examples of com.sun.star.uno.IBridge

    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);

    if(rInitialObject != null)
    {
      System.err.println("got the remote object");
      System.out.println("before naming service !");
View Full Code Here

Examples of com.sun.star.uno.IBridge

            // sName.toString(), but the UnoRuntime bridge management is
            // obsolete anyway and should be removed

    // do not create a new bridge, if one already exists
        if (hasName) {
            IBridge iBridges[] = UnoRuntime.getBridges();
            for(int i = 0; i < iBridges.length; ++ i) {
                XBridge xBridge = (XBridge)UnoRuntime.queryInterface(XBridge.class, iBridges[i]);

                if(xBridge != null) {
                    if(xBridge.getName().equals(sName))
                        throw new BridgeExistsException(sName + " already exists");
                }
            }
        }

    XBridge xBridge = null;

    try {
      IBridge iBridge = UnoRuntime.getBridgeByName("java", context, "remote", context, hasName ? new Object[]{sProtocol, aConnection, anInstanceProvider, sName} : new Object[]{sProtocol, aConnection, anInstanceProvider});

      xBridge = (XBridge)UnoRuntime.queryInterface(XBridge.class, iBridge);
    }
    catch(Exception exception) {
      throw new com.sun.star.lang.IllegalArgumentException(exception.getMessage());
View Full Code Here

Examples of com.sun.star.uno.IBridge

   * @see                           com.sun.star.bridge.XBridgeFactory
   */
    public XBridge getBridge(String sName) throws com.sun.star.uno.RuntimeException {
    XBridge xBridge = null;

    IBridge iBridges[] = UnoRuntime.getBridges();
    for(int i = 0; i < iBridges.length; ++ i) {
      xBridge = (XBridge)UnoRuntime.queryInterface(XBridge.class, iBridges[i]);

      if(xBridge != null) {
        if(xBridge.getName().equals(sName))
View Full Code Here

Examples of com.sun.star.uno.IBridge

   * @see                           com.sun.star.bridge.XBridgeFactory
   */
    public synchronized XBridge[] getExistingBridges() throws com.sun.star.uno.RuntimeException {
    Vector vector = new Vector();

    IBridge iBridges[] = UnoRuntime.getBridges();
    for(int i = 0; i < iBridges.length; ++ i) {
      XBridge xBridge = (XBridge)UnoRuntime.queryInterface(XBridge.class, iBridges[i]);

      if(xBridge != null)
        vector.addElement(xBridge);
View Full Code Here

Examples of com.sun.star.uno.IBridge

            // sName.toString(), but the UnoRuntime bridge management is
            // obsolete anyway and should be removed

    // do not create a new bridge, if one already exists
        if (hasName) {
            IBridge iBridges[] = UnoRuntime.getBridges();
            for(int i = 0; i < iBridges.length; ++ i) {
                XBridge xBridge = UnoRuntime.queryInterface(XBridge.class, iBridges[i]);

                if(xBridge != null) {
                    if(xBridge.getName().equals(sName))
                        throw new BridgeExistsException(sName + " already exists");
                }
            }
        }

    XBridge xBridge = null;

    try {
      IBridge iBridge = UnoRuntime.getBridgeByName("java", context, "remote", context, hasName ? new Object[]{sProtocol, aConnection, anInstanceProvider, sName} : new Object[]{sProtocol, aConnection, anInstanceProvider});

      xBridge = UnoRuntime.queryInterface(XBridge.class, iBridge);
    }
    catch(Exception exception) {
      throw new com.sun.star.lang.IllegalArgumentException(exception.getMessage());
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.