summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-03-25 10:03:32 +0000
committerKurt Zenker <kz@openoffice.org>2004-03-25 10:03:32 +0000
commitdf09295c0ae52ea81462bff42319745df49f837c (patch)
tree18c51989173e308aad57a6039980ba83f45f6672 /jurt
parent4afe515fda5a36b1e75f84478811b46106c7b942 (diff)
INTEGRATION: CWS kso11 (1.3.36); FILE MERGED
2004/03/11 08:49:32 sb 1.3.36.1: #115880# Cloned 112066.
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java23
1 files changed, 20 insertions, 3 deletions
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java
index a180a264737b..db4ccb17c80a 100644
--- a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java
+++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java
@@ -2,9 +2,9 @@
*
* $RCSfile: ProxyFactory.java,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2003-08-13 17:22:19 $
+ * last change: $Author: kz $ $Date: 2004-03-25 11:03:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,6 +61,7 @@
package com.sun.star.lib.uno.bridges.java_remote;
+import com.sun.star.bridge.XBridge;
import com.sun.star.uno.IQueryInterface;
import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
@@ -76,8 +77,9 @@ import java.lang.reflect.Proxy;
* generic proxy class.</p>
*/
final class ProxyFactory {
- public ProxyFactory(RequestHandler requestHandler) {
+ public ProxyFactory(RequestHandler requestHandler, XBridge bridge) {
this.requestHandler = requestHandler;
+ this.bridge = bridge;
}
public Object create(String oid, Type type) {
@@ -97,6 +99,16 @@ final class ProxyFactory {
}
}
+ public static XBridge getBridge(Object obj) {
+ if (Proxy.isProxyClass(obj.getClass())) {
+ InvocationHandler h = Proxy.getInvocationHandler(obj);
+ if (h instanceof Handler) {
+ return ((Handler) h).getBridge();
+ }
+ }
+ return null;
+ }
+
static int getDebugCount() {
synchronized (debugCountLock) {
return debugCount;
@@ -126,6 +138,10 @@ final class ProxyFactory {
return ProxyFactory.this == factory;
}
+ public XBridge getBridge() {
+ return bridge;
+ }
+
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable
{
@@ -191,4 +207,5 @@ final class ProxyFactory {
private static int debugCount = 0;
private final RequestHandler requestHandler;
+ private final XBridge bridge;
}