com.sun.jini.phoenix
Class ConstrainableAID

java.lang.Object
  extended by java.rmi.activation.ActivationID
      extended by com.sun.jini.phoenix.AID
          extended by com.sun.jini.phoenix.ConstrainableAID
All Implemented Interfaces:
Serializable, RemoteMethodControl, TrustEquivalence

final class ConstrainableAID
extends AID
implements RemoteMethodControl, TrustEquivalence

A subclass of AID that implements the RemoteMethodControl interface by delegating to the contained activator.

This class exists as a convenience for activation system daemon implementations supporting RemoteMethodControl on proxies, to avoid requiring all such implementations to make code available for dynamic download to clients.

Since:
2.0
Author:
Sun Microsystems, Inc.

Nested Class Summary
(package private) static class ConstrainableAID.State
           
(package private) static class ConstrainableAID.Verifier
          A ProxyTrust trust verifier for ConstrainableAID instances.
 
Field Summary
private  MethodConstraints constraints
          the client constraints
private static Method[] methodMapping
           
private static long serialVersionUID
           
 
Fields inherited from class com.sun.jini.phoenix.AID
activator, uid
 
Constructor Summary
  ConstrainableAID(Activator activator, UID uid)
          Creates an activation identifier containing the specified remote object activator, a new unique identifier, and null client constraints.
private ConstrainableAID(Activator activator, UID uid, MethodConstraints constraints)
          Creates an activation identifier containing the specified remote object activator and a new unique identifier.
 
Method Summary
 boolean checkTrustEquivalence(Object obj)
          Returns true if the object is an instance of this class with the same UID and a trust equivalent activator.
 MethodConstraints getConstraints()
          Returns the client constraints.
private  ProxyTrustIterator getProxyTrustIterator()
          Returns an iterator that yields the activator.
 RemoteMethodControl setConstraints(MethodConstraints constraints)
          Returns a new copy of this activation identifier containing the same unique identifier and a copy of the activator with the new specified constraints.
private  Object writeReplace()
           
 
Methods inherited from class com.sun.jini.phoenix.AID
activate, equals, getUID, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

methodMapping

private static final Method[] methodMapping

constraints

private final MethodConstraints constraints
the client constraints

Constructor Detail

ConstrainableAID

public ConstrainableAID(Activator activator,
                        UID uid)
Creates an activation identifier containing the specified remote object activator, a new unique identifier, and null client constraints.

Parameters:
activator - the activator
uid - the unique identifier
Throws:
IllegalArgumentException - if the specified activator is not an instance of RemoteMethodControl or TrustEquivalence

ConstrainableAID

private ConstrainableAID(Activator activator,
                         UID uid,
                         MethodConstraints constraints)
Creates an activation identifier containing the specified remote object activator and a new unique identifier.

Parameters:
activator - the activator
uid - the unique identifier
constraints - the client constraints, or null
Throws:
IllegalArgumentException - if the specified activator is not an instance of RemoteMethodControl or TrustEquivalence
Method Detail

getProxyTrustIterator

private ProxyTrustIterator getProxyTrustIterator()
Returns an iterator that yields the activator.


setConstraints

public RemoteMethodControl setConstraints(MethodConstraints constraints)
Returns a new copy of this activation identifier containing the same unique identifier and a copy of the activator with the new specified constraints.

Specified by:
setConstraints in interface RemoteMethodControl
Parameters:
constraints - the client constraints, or null
Returns:
a new copy of this activation identifier containing the same unique identifier and a copy of the activator with the new specified client constraints
See Also:
getConstraints()

getConstraints

public MethodConstraints getConstraints()
Returns the client constraints.

Specified by:
getConstraints in interface RemoteMethodControl
Returns:
the client constraints, or null
See Also:
setConstraints(net.jini.core.constraint.MethodConstraints)

checkTrustEquivalence

public boolean checkTrustEquivalence(Object obj)
Returns true if the object is an instance of this class with the same UID and a trust equivalent activator.

Specified by:
checkTrustEquivalence in interface TrustEquivalence
Parameters:
obj - object to check that is not yet known to be trusted
Returns:
true if the specified object (that is not yet known to be trusted) is equivalent in trust, content, and function to this known trusted object, and returns false otherwise

writeReplace

private Object writeReplace()


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