
158 11. Client Server Architecture
To get the remote clients identity, the concept is applied inside the SO and
overrides the platonic RO method. First, the remote method to call the
remote client is implemented and externally hidden as private:
private RemoteMethod<Object> getIdentity
= new RemoteMethod<Object>()
{ @Override
public Object call() throws RemoteException
{ return remoteObject.getIdentity(); }
};
Then, the actual method can be published with
final public Object getIdentity()
{
RemoteCall<Object>
remoteCall = new RemoteCall<Object>( getID );
Object remoteID = null;
try { remoteID =
remoteCall.get( maxWaitForRemoteObject );
// validate remote value ...