While being only 5 lines of Java source code, its capability is elegantly sophisticated.
|Constructor and Description|
The constructor assigns the initial server object reference.
|Modifier and Type||Method and Description|
This method is used to dynamically redefine the functionality of this wrapper at runtime.
This method simply redirects all invocations to the currently wrapped object.
public DynamicObject(Object object)
object- The initial encapsulated server functionality to be remoted through this object.
method- The method name to be invoked on the wrapped object.
args- The arguments to provide to the method for its invocation.
NoSuchMethodException- If no matching method can be found.
Exception- If the wrapped object rejected the invocation, for application specific reasons.
public void changeObject(Object object)
object- The new encapsulated functionality to be provided to the remote clients.
Copyright © 2016. All Rights Reserved.