protected boolean run(XBridge bridge) throws Throwable {
XTestFrame f = (XTestFrame) UnoRuntime.queryInterface(
XTestFrame.class, bridge.getInstance("TestFrame"));
XComponentContext context
= Bootstrap.createInitialComponentContext(null);
XAcceptor acceptor = Acceptor.create(context);
XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface(
XBridgeFactory.class,
context.getServiceManager().createInstanceWithContext(
"com.sun.star.bridge.BridgeFactory", context));
System.out.println("Client, 2nd connection: Accepting...");
XInstanceProvider prov = new Provider();
f.notifyAccepting(new Done(), prov.getInstance(INSTANCE1),
prov.getInstance(INSTANCE2));
XConnection connection = acceptor.accept(CONNECTION_DESCRIPTION);
System.out.println("Client, 2nd connection: ...connected...");
XBridge bridge2 = factory.createBridge(
"", PROTOCOL_DESCRIPTION, connection, prov);
System.out.println("Client, 2nd connection: ...bridged.");
synchronized (lock) {