public class RemoteObjectInvocationHandler extends RemoteObject implements InvocationHandler, Remote, Serializable
Registry
or UnicastRemoteObject
methods if the remote
reference is known but the corresponding stub class is not accessible.ref
Constructor and Description |
---|
RemoteObjectInvocationHandler(RemoteRef reference)
Construct the remote invocation handler that forwards calls to the given
remote object.
|
public RemoteObjectInvocationHandler(RemoteRef reference)
reference
- the reference to the remote object where the method
calls should be forwarded.public Object invoke(Object proxyInstance, Method method, Object[] parameters) throws Throwable
RemoteRef.invoke(Remote, Method, Object[], long)
of the
remote reference that was passed in constructor. The methods are handled as
following:
invoke
in interface InvocationHandler
proxyInstance
- the instance of the proxy stubmethod
- the method being invokedparameters
- the method parametersIllegalAccessException
- if the passed proxy instance does not implement Remote interface.UnexpectedException
- if remote call throws some exception, not listed in the
throws
clause of the method being called.Throwable
- that is thrown by remote call, if that exception is listend in
the throws
clause of the method being called.Proxy
,
UndeclaredThrowableException