Examples of IBridge


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 = 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 = UnoRuntime.queryInterface(XBridge.class, iBridges[i]);

      if(xBridge != null)
        vector.addElement(xBridge);
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

            // 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

   
      XConnection xConnection = xAcceptor.accept("socket,host=localhost,port=6002");
     
      MyInstanceProvider instanceProvider = new MyInstanceProvider( manager );
     
      IBridge iBridge = UnoRuntime.getBridgeByName(
                   "java", null, "remote", null,
                  new Object[]{"iiop", xConnection, instanceProvider});           
    }
    catch (Exception e) {
      System.err.println(e);
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.