diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-07-23 13:52:05 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-07-23 13:52:05 +0000 |
commit | bb7da2c4d53800ce458a1e619c968e6e465a9085 (patch) | |
tree | 563c1018b2fc07ea9b8e5e4daecb970fab2be3e6 /bridges/test | |
parent | 6602cab6b75b535d0bb5bf6b44ea0b1341c36b5e (diff) |
INTEGRATION: CWS sb20 (1.2.44); FILE MERGED
2004/07/09 13:29:34 sb 1.2.44.1: #i29741# Retrofitted existing services as single-interface--based ones.
Diffstat (limited to 'bridges/test')
-rw-r--r-- | bridges/test/java_uno/nativethreadpool/Relay.java | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/bridges/test/java_uno/nativethreadpool/Relay.java b/bridges/test/java_uno/nativethreadpool/Relay.java index 8bf2b0b8e328..6b610f4e2900 100644 --- a/bridges/test/java_uno/nativethreadpool/Relay.java +++ b/bridges/test/java_uno/nativethreadpool/Relay.java @@ -2,9 +2,9 @@ * * $RCSfile: Relay.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: vg $ $Date: 2003-10-09 10:20:18 $ + * last change: $Author: rt $ $Date: 2004-07-23 14:52:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,10 +68,10 @@ import com.sun.star.comp.helper.Bootstrap; import com.sun.star.comp.loader.FactoryHelper; import com.sun.star.connection.AlreadyAcceptingException; import com.sun.star.connection.ConnectionSetupException; +import com.sun.star.connection.Acceptor; import com.sun.star.connection.XAcceptor; import com.sun.star.connection.XConnection; import com.sun.star.lang.WrappedTargetRuntimeException; -import com.sun.star.lang.XMultiComponentFactory; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XSingleServiceFactory; import com.sun.star.registry.XRegistryKey; @@ -91,27 +91,20 @@ public final class Relay implements XRelay, XSource { } catch (Exception e) { throw new com.sun.star.uno.RuntimeException(e.toString(), this); } - XMultiComponentFactory factory = context.getServiceManager(); - final XBridgeFactory bridgeFactory; - final XAcceptor acceptor; + final XAcceptor acceptor = Acceptor.create(context); + final XBridgeFactory factory; try { - bridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface( + factory = (XBridgeFactory) UnoRuntime.queryInterface( XBridgeFactory.class, - factory.createInstanceWithContext( + context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); - acceptor = (XAcceptor) UnoRuntime.queryInterface( - XAcceptor.class, - factory.createInstanceWithContext( - "com.sun.star.connection.Acceptor", context)); - } catch (RuntimeException e) { - throw e; } catch (com.sun.star.uno.Exception e) { throw new WrappedTargetRuntimeException(e.toString(), this, e); } new Thread() { public void run() { try { - bridgeFactory.createBridge( + factory.createBridge( "", "urp", acceptor.accept("socket,host=localhost,port=3831"), new XInstanceProvider() { |