public class ZippedProxy extends Object implements Invoke
ItemServer during the binding of
its server object. After that it can no longer be modified at the server.
If the server loads proxies into its runtime, i.e. it is not using a
ProxyLoader, it is highly recommended to use
zipped proxies, since processor horsepower is increaseing steadily, while
long-haul network bandwidth is not.
The class is not final; this allows subclasses to have no-arg constructors, using a proxy of their choosing. Also, a subclass could optionally encrypt the payload before sending, and decrypt it on arrival, if necessary.
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
payload
The compressed serialized proxy object.
|
protected Object |
proxy
A reference to the internal proxy object, before serialization at the
server, and when decompressed on arrival at the host.
|
| Constructor and Description |
|---|
ZippedProxy(Object proxy)
The constructor retains the reference to the proxy, until the server
reference is provided by the
ItemServer, after that,
it is serialized into the payload array, and discarded. |
protected byte[] payload
protected transient Object proxy
public ZippedProxy(Object proxy)
ItemServer, after that,
it is serialized into the payload array, and discarded. If there are no
other references to the proxy, it will be garbage collected.proxy - The internal proxy object.public final Object invoke(String method, Object args) throws Exception
invoke in interface Invokemethod - The public method to invoke on the internal proxy object,
following the initial invocation, which is used to compress the proxy.args - First the remote server reference, following that,
callback data from any outside VMs to be given to the internal proxy.Exception - For any proxy-specific reasons.RemoteException - For any network related errors.Copyright © 2016. All Rights Reserved.