Top Description Inners Fields Constructors Methods
com.sun.star.lib.uno.bridges.java_remote

pack-priv final Class ProxyFactory

extends Object
Class Inheritance
Imports
com.sun.star.bridge.XBridge, com.sun.star.lib.util.AsynchronousFinalizer, com.sun.star.uno.IQueryInterface, .Type, .UnoRuntime, java.lang.reflect.InvocationHandler, .Method, .Proxy

A factory for proxies specific to the java_remote_bridge.

Eventually, this class should be united with all other proxy classes specific to certain bridges (for example, the JNI bridge), resulting in a generic proxy class.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final AsynchronousFinalizer
private final com.sun.star.bridge.XBridge
private static int
private static final Object
private static final Method
private static final Method
private static final Method
private static final Method
private static final Method
private static final Method
private final RequestHandler

Constructor Summary

AccessConstructor and Description
public
ProxyFactory(RequestHandler requestHandler, com.sun.star.bridge.XBridge bridge)

Method Summary

Modifier and TypeMethod and Description
public Object
create(String oid, Type type)

private static void
public void
public static com.sun.star.bridge.XBridge
pack-priv static int
private static void
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

asynchronousFinalizerback to summary
private final AsynchronousFinalizer asynchronousFinalizer
bridgeback to summary
private final com.sun.star.bridge.XBridge bridge
debugCountback to summary
private static int debugCount
debugCountLockback to summary
private static final Object debugCountLock
METHOD_EQUALSback to summary
private static final Method METHOD_EQUALS
METHOD_GET_OIDback to summary
private static final Method METHOD_GET_OID
METHOD_HASH_CODEback to summary
private static final Method METHOD_HASH_CODE
METHOD_IS_SAMEback to summary
private static final Method METHOD_IS_SAME
METHOD_QUERY_INTERFACEback to summary
private static final Method METHOD_QUERY_INTERFACE
METHOD_TO_STRINGback to summary
private static final Method METHOD_TO_STRING
requestHandlerback to summary
private final RequestHandler requestHandler

Constructor Detail

ProxyFactoryback to summary
public ProxyFactory(RequestHandler requestHandler, com.sun.star.bridge.XBridge bridge)

Method Detail

createback to summary
public Object create(String oid, Type type)
decrementDebugCountback to summary
private static void decrementDebugCount()
disposeback to summary
public void dispose() throws InterruptedException
getBridgeback to summary
public static com.sun.star.bridge.XBridge getBridge(Object obj)
getDebugCountback to summary
pack-priv static int getDebugCount()
incrementDebugCountback to summary
private static void incrementDebugCount()
isProxyback to summary
public boolean isProxy(Object obj)
com.sun.star.lib.uno.bridges.java_remote back to summary

private final Class ProxyFactory.Handler

extends Object
implements InvocationHandler
Class Inheritance
  • java.lang.Object
  • com.sun.star.lib.uno.bridges.java_remote.ProxyFactory.Handler
All Implemented Interfaces
java.lang.reflect.InvocationHandler

Field Summary

Modifier and TypeField and Description
private int
private final String
private final Type

Constructor Summary

AccessConstructor and Description
public
Handler(String oid, Type type)

Method Summary

Modifier and TypeMethod and Description
protected void
finalize()

Overrides java.lang.Object.finalize.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

public com.sun.star.bridge.XBridge
public Object
invoke(Object proxy, Method method, Object[] args)

Implements java.lang.reflect.InvocationHandler.invoke.

Processes a method invocation on a proxy instance and returns the result.

public boolean
private Object
request(String operation, Object[] args)

Inherited from java.lang.Object:
cloneequalsgetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dummyback to summary
private int dummy
Annotations
@SuppressWarnings:unused
oidback to summary
private final String oid
typeback to summary
private final Type type

Constructor Detail

Handlerback to summary
public Handler(String oid, Type type)

Method Detail

finalizeback to summary
protected void finalize()

Overrides java.lang.Object.finalize.

Doc from java.lang.Object.finalize.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.

When running in a Java virtual machine in which finalization has been disabled or removed, the garbage collector will never call finalize(). In a Java virtual machine in which finalization is enabled, the garbage collector might call finalize only after an indefinite delay.

The general contract of finalize is that it is invoked if and when the Java virtual machine has determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, except as a result of an action taken by the finalization of some other object or class which is ready to be finalized. The finalize method may take any action, including making this object available again to other threads; the usual purpose of finalize, however, is to perform cleanup actions before the object is irrevocably discarded. For example, the finalize method for an object that represents an input/output connection might perform explicit I/O transactions to break the connection before the object is permanently discarded.

The finalize method of class Object performs no special action; it simply returns normally. Subclasses of Object may override this definition.

The Java programming language does not guarantee which thread will invoke the finalize method for any given object. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked. If an uncaught exception is thrown by the finalize method, the exception is ignored and finalization of that object terminates.

After the finalize method has been invoked for an object, no further action is taken until the Java virtual machine has again determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, including possible actions by other objects or classes which are ready to be finalized, at which point the object may be discarded.

The finalize method is never invoked more than once by a Java virtual machine for any given object.

Any exception thrown by the finalize method causes the finalization of this object to be halted, but is otherwise ignored.

Annotations
@Override
getBridgeback to summary
public com.sun.star.bridge.XBridge getBridge()
invokeback to summary
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable

Implements java.lang.reflect.InvocationHandler.invoke.

Doc from java.lang.reflect.InvocationHandler.invoke.

Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.

Exceptions
Throwable:
the exception to throw from the method invocation on the proxy instance. The exception's type must be assignable either to any of the exception types declared in the throws clause of the interface method or to the unchecked exception types java.lang.RuntimeException or java.lang.Error. If a checked exception is thrown by this method that is not assignable to any of the exception types declared in the throws clause of the interface method, then an UndeclaredThrowableException containing the exception that was thrown by this method will be thrown by the method invocation on the proxy instance.
matchesback to summary
public boolean matches(ProxyFactory factory)
requestback to summary
private Object request(String operation, Object[] args) throws Throwable