com.sun.jini.outrigger
Class ProxyVerifier

java.lang.Object
  extended by com.sun.jini.outrigger.ProxyVerifier
All Implemented Interfaces:
Serializable, TrustVerifier

final class ProxyVerifier
extends Object
implements Serializable, TrustVerifier

This class defines a trust verifier for the proxies related to the Outrigger implementation of JavaSpaces technology. Uses LandlordProxyVerifier to verify Leases.

Since:
2.0
Author:
Sun Microsystems, Inc.
See Also:
TrustVerifier

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.jini.security.TrustVerifier
TrustVerifier.Context
 
Field Summary
private static long serialVersionUID
           
private  RemoteMethodControl server
          The canonical instance of the server reference.
private  Uuid uuid
          The top level Uuid that has been assigned to the Outrigger server this verifier is for.
 
Constructor Summary
ProxyVerifier(OutriggerServer server, Uuid uuid)
          Returns a verifier for the smart proxies of an Outrigger server with the specified server reference.
 
Method Summary
 boolean isTrustedObject(Object obj, TrustVerifier.Context ctx)
          Returns true if the specified proxy object (that is not yet known to be trusted) is equivalent in trust, content, and function to the canonical server reference this object was constructed with; otherwise returns false.
private  void readObject(ObjectInputStream in)
          Verifies that the server reference implements TrustEquivalence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

server

private final RemoteMethodControl server
The canonical instance of the server reference. This instance will be used by the isTrusted method as the known trusted object used to determine whether or not a given proxy is equivalent in trust, content, and function.


uuid

private final Uuid uuid
The top level Uuid that has been assigned to the Outrigger server this verifier is for.

Constructor Detail

ProxyVerifier

ProxyVerifier(OutriggerServer server,
              Uuid uuid)
Returns a verifier for the smart proxies of an Outrigger server with the specified server reference.

Parameters:
server - the reference to the OutriggerServer.
uuid - the Uuid assigned to the Outrigger server server is a reference to.
Throws:
UnsupportedOperationException - if server does not implement both RemoteMethodControl and TrustEquivalence
NullPointerException - if either argument is null.
Method Detail

isTrustedObject

public boolean isTrustedObject(Object obj,
                               TrustVerifier.Context ctx)
                        throws RemoteException
Returns true if the specified proxy object (that is not yet known to be trusted) is equivalent in trust, content, and function to the canonical server reference this object was constructed with; otherwise returns false.

Specified by:
isTrustedObject in interface TrustVerifier
Parameters:
obj - proxy object that will be compared to this class' stored canonical proxy to determine whether or not the given proxy object is equivalent in trust, content, and function.
ctx - the trust verifier context, to aid in verification of the specified object and its components
Returns:
true if the specified object (that is not yet known to be trusted) is equivalent in trust, content, and function to the canonical inner proxy object referenced in this class; otherwise returns false.
Throws:
NullPointerException - if any argument is null
RemoteException - if a communication-related exception occurs

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Verifies that the server reference implements TrustEquivalence.

Throws:
IOException
ClassNotFoundException


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.