| 
GigaSpaces XAP 9.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jini.proxy.ConstrainableProxyUtil
public class ConstrainableProxyUtil
A collection of utility methods for use in implementing constrainable proxies. This class cannot be instantiated.
| Method Summary | |
|---|---|
static boolean | 
equivalentConstraints(MethodConstraints methodConstraints1,
                      MethodConstraints methodConstraints2,
                      Method[] mappings)
Test to see if two MethodConstraints instances are
 equivalent given a method-to-method mapping. | 
static MethodConstraints | 
translateConstraints(MethodConstraints methodConstraints,
                     Method[] mappings)
Creates a MethodConstraints using the constraints in
 methodConstraints, but with the methods remapped according
 to mappings, where the first element of each pair of
 elements is mapped to the second. | 
static void | 
verifyConsistentConstraints(MethodConstraints methodConstraints,
                            Object proxy,
                            Method[] mappings)
Verify that an object, proxy, is an instance of
 RemoteMethodControl its MethodConstraints are
 equivalent to another MethodConstraints instance,
 methodConstraints once a mapping has been applied. | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static MethodConstraints translateConstraints(MethodConstraints methodConstraints,
                                                     Method[] mappings)
MethodConstraints using the constraints in
 methodConstraints, but with the methods remapped according
 to mappings, where the first element of each pair of
 elements is mapped to the second.  For example, if
 methodConstraints returns constraints C1 for
 method M1, and the elements of mappings are methods
 M1 and M2, then the resulting method
 constraints return C1 for method M2.
methodConstraints - the method constraints whose methods should be
              translated, or null for empty constraintsmappings - the method mappings
NullPointerException - if mappings is
               null or contains null elements
IllegalArgumentException - if mappings contains an
               odd number of elements
public static boolean equivalentConstraints(MethodConstraints methodConstraints1,
                                            MethodConstraints methodConstraints2,
                                            Method[] mappings)
MethodConstraints instances are
 equivalent given a method-to-method mapping. Only the
 constraints for methods that appear in the mapping are
 compared. The mapping is represented by an array, 
 mappings, of 2n Method objects.  For all values
 p less than n the constraints associated with
 mappings[2p] in methodConstraints1
 are compared to the constraints associated with
 mappings[2p+1] in
 methodConstraints2. If null is passed in for both
 instances they are considered equivalent.
methodConstraints1 - the first MethodConstraints
        object to compare.methodConstraints2 - the second MethodConstraints
        object to compare.mappings - the method-to-method mapping.
true if the MethodConstraints 
         instances represent equivalent constraints, returns
         false otherwise.
NullPointerException - if mapping is
         null contains null elements.
IllegalArgumentException - if mapping contains an
         odd number of elements
public static void verifyConsistentConstraints(MethodConstraints methodConstraints,
                                               Object proxy,
                                               Method[] mappings)
                                        throws InvalidObjectException
proxy, is an instance of
 RemoteMethodControl its MethodConstraints are
 equivalent to another MethodConstraints instance,
 methodConstraints once a mapping has been applied.
 If proxy does not implement
 RemoteMethodControl or the associated constraints are
 not equivalent throw an InvalidObjectException. The
 mapping is represented by an array, mappings, of
 2n Method objects. For all values p less than n the
 constraints associated with mappings[2p] in
 methodConstraints are compared to the constraints
 associated with mappings[2p+1] in the
 MethodConstraints returned by
 proxy.getConstraints. Will also return normally if
 both methodConstraints and the value returned by
 proxy.getConstraints are null.
methodConstraints - the method constraints 
        proxy should have.proxy - the proxy to test, must implement 
        RemoteMethodControl.mappings - the method to method mapping
NullPointerException - if mappings or
         proxy is null or if
         mapping contains null elements
IllegalArgumentException - if mappings contains an
               odd number of elements
InvalidObjectException - if proxy does
         not implement RemoteMethodControl, or if
         the constraints on proxy are not
         equivalent to methodConstraints.
  | 
GigaSpaces XAP 9.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||