ItemProxyobject. The server item invokes methods on this client proxy which result in an immediate callback invocation on the client.
Note: this paradigm is not threadsafe! It is expected that callbacks to the remote client will not be invoked reentrantly. Correspondingly, a unique instance of this object must be given to each remote client object. A practical usage example is available online.
|Modifier and Type||Field and Description|
This is the remoted reference to the server's ClientProxy.
This is the longest value, in milliseconds, that the server will wait for a client invocation to execute before it aborts it.
|Constructor and Description|
A server creates this object, then provides the remote reference member remoteThis to the client.
|Modifier and Type||Method and Description|
This method abruptly terminates the ClientProxy link to the server.
This method serves two fundamentally different, but symmetrical purposes.
public int timeout
public final Remote remoteThis
ItemProxyconstructor, to create a firewall traversing asynchronous callback link. In order to work, logically, it can only be passed to one remote client.
public ClientProxy() throws RemoteException
ItemProxyclass completes the second half.
RemoteException- If the remote reference creation fails.
public void cutOff() throws NoSuchObjectException
NoSuchObjectException- Should this method ever be called more than once, on the same object.
ItemProxycalls this method to have its calling thread blocked until the server item needs to make an asynchronous callback. Secondly, the server item will also invoke this method, and will have its thread blocked, until the resulting data, or exception, is returned from the firewalled client, via its ItemProxy.
method- The name of the method on the firewalled remote client to be invoked asynchronously.
args- The data to be provided the method of the callback method, or data resulting from the client callback.
InterruptedException- If the client is not listening, or if the callback timeout has expired.
RemoteException- For any network related failures.
Exception- For any client specific reasons.
Copyright © 2016. All Rights Reserved.