final class ProxyVerifier extends Object implements TrustVerifier, Serializable
TrustVerifier.Context
Modifier and Type | Field and Description |
---|---|
private ServiceID |
registrarID
The registrar's service ID, used for comparison with registrar service
IDs extracted from smart proxies to verify.
|
private static long |
serialVersionUID |
private RemoteMethodControl |
server
Canonical service reference, used for comparison with inner server
references extracted from smart proxies to verify.
|
Constructor and Description |
---|
ProxyVerifier(Registrar server,
ServiceID registrarID)
Constructs proxy verifier which compares server references extracted
from smart proxies with the given canonical server reference, which must
implement both RemoteMethodControl and TrustEquivalence.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTrustedObject(Object obj,
TrustVerifier.Context ctx)
Returns true if the given object is a trusted proxy, or false otherwise.
|
private void |
readObject(ObjectInputStream in)
Reads the default serializable field value for this instance, followed
by the registrar's service ID encoded as specified by the
ServiceID.writeBytes method.
|
private void |
writeObject(ObjectOutputStream out)
Writes the default serializable field value for this instance, followed
by the registrar's service ID encoded as specified by the
ServiceID.writeBytes method.
|
private static final long serialVersionUID
private final RemoteMethodControl server
private transient ServiceID registrarID
ProxyVerifier(Registrar server, ServiceID registrarID)
public boolean isTrustedObject(Object obj, TrustVerifier.Context ctx) throws RemoteException
isTrustedObject
in interface TrustVerifier
obj
- the object in which to verify trustctx
- the trust verifier context, to aid in verification of
the specified object and its componentstrue
if the specified object is known to be
trusted to correctly implement its contract; false
otherwiseRemoteException
- if a communication-related exception occursprivate void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.