java.rmi.server
Class TrustVerifierData
java.lang.Object
|
+--java.rmi.server.TrustVerifierData
- All Implemented Interfaces:
- java.io.Serializable
- public final class TrustVerifierData
- extends java.lang.Object
- implements java.io.Serializable
Holds a trust verifier, as well as optional codebase and signer
information. The codebase and signer information can be used to force
client verification that the correct code for the verifier itself is used.
- Since:
- 1.4
- See Also:
- Serialized Form
Constructor Summary |
TrustVerifierData(java.lang.Object verifier,
java.lang.String codebase,
java.lang.Object[] signers)
Creates an instance containing the specified trust verifier, codebase
(if any), and signers (if any). |
Method Summary |
java.lang.Object |
checkVerifier()
Returns the trust verifier if the actual codebase and signers of the
verifier's class match the required codebase and signers. |
java.lang.String |
getCodebase()
Returns the required codebase of the verifier's class, or
null . |
java.lang.Object[] |
getSigners()
Returns the required signers of the verifier's class, or
null . |
java.lang.Object |
getVerifier()
Returns the trust verifier. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TrustVerifierData
public TrustVerifierData(java.lang.Object verifier,
java.lang.String codebase,
java.lang.Object[] signers)
- Creates an instance containing the specified trust verifier, codebase
(if any), and signers (if any). For
ProxyTrust
, the
trust verifier should either be a ProxyTrust.Verifier
instance or a proxy object that implements
RemoteSecurity
. For
ActivatorTrust
, the trust
verifier should either be a
ActivatorTrust.Verifier
instance or an
ActivationID
instance.
The signers array passed to the constructor is neither modified nor
retained; subsequent changes to that array have no effect on the
instance created.
- Parameters:
verifier
- trust verifiercodebase
- required codebase of the verifier's class, or
null
signers
- required signers of the verifier's class, or
null
- Throws:
NullPointerException
- if any element of signers
is
null
java.lang.IllegalArgumentException
- if the verifier is not an instance of
ProxyTrust.Verifier
, RemoteSecurity
,
ActivatorTrust.Verifier
, or ActivationID
getVerifier
public java.lang.Object getVerifier()
- Returns the trust verifier.
- Returns:
- the trust verifier
getCodebase
public java.lang.String getCodebase()
- Returns the required codebase of the verifier's class, or
null
.
- Returns:
- the required codebase of the verifier's class, or
null
getSigners
public java.lang.Object[] getSigners()
- Returns the required signers of the verifier's class, or
null
. A new array is returned each time.
- Returns:
- the required signers of the verifier's class, or
null
checkVerifier
public java.lang.Object checkVerifier()
- Returns the trust verifier if the actual codebase and signers of the
verifier's class match the required codebase and signers. If the
required codebase is non-
null
, then the RMI codebase
annotation (as given by RMIClassLoader.getClassAnnotation
) for the verifier's class must be
the same as this value. If one or more required signers are specified,
then the signers (as given by Class.getSigners
) of the verifier's class must equal the required
signers (except for ordering). If the required codebase and signers
are both null
, then the classloader of the verifier's
class must be the context classloader for the current thread or an
ancestor of that classloader.
- Throws:
java.lang.SecurityException
- if the actual codebase and signers of the
verifier's class do not match the required codebase and signers
Copyright © 2000 Sun Microsystems, Inc. All rights reserved