java.rmi.server
Class MethodConstraints

java.lang.Object
  |
  +--java.rmi.server.MethodConstraints
All Implemented Interfaces:
java.io.Serializable

public class MethodConstraints
extends java.lang.Object
implements java.io.Serializable

Specifies the security constraints for a specific remote method.

Since:
1.4
See Also:
Serialized Form

Constructor Summary
MethodConstraints(java.lang.String name, java.lang.Class[] parameterTypes, SecurityConstraints constraints)
          Creates constraints for the specified method or methods.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Two instances of this class are equal if they have equal names, equal parameter types, and equal constraints.
 SecurityConstraints getConstraints()
          Returns the constraints for the specified remote method or methods, as a non-null instance.
 java.lang.String getName()
          Returns the name of the remote method to which the constraints are applied.
 java.lang.Class[] getParameterTypes()
          Returns the parameter types of the remote method, in declared order, as a new non-null array, or returns null for wildcard parameter types.
 int hashCode()
          Returns a hash code value for this object.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodConstraints

public MethodConstraints(java.lang.String name,
                         java.lang.Class[] parameterTypes,
                         SecurityConstraints constraints)
Creates constraints for the specified method or methods. The constraints can be null, which is treated the same as the empty instance. The value of parameterTypes can be null, which is treated as a wildcard, matching all methods with the specified name. The array passed to the constructor is neither modified nor retained; subsequent changes to that array have no effect on the instance created.
Parameters:
name - the name of the method
parameterTypes - the formal parameter types of the method, in declared order, or null for wildcard parameter types
constraints - the constraints, or null
Throws:
NullPointerException - if the name of the method is null or any element of parameterTypes is null
Method Detail

getName

public java.lang.String getName()
Returns the name of the remote method to which the constraints are applied.
Returns:
the name of the remote method to which the constraints are applied

getParameterTypes

public java.lang.Class[] getParameterTypes()
Returns the parameter types of the remote method, in declared order, as a new non-null array, or returns null for wildcard parameter types.
Returns:
the parameter types as a new non-null array, or null for wildcard parameter types

getConstraints

public SecurityConstraints getConstraints()
Returns the constraints for the specified remote method or methods, as a non-null instance.
Returns:
the constraints for the specified remote method or methods, as a non-null instance

hashCode

public int hashCode()
Returns a hash code value for this object.
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Two instances of this class are equal if they have equal names, equal parameter types, and equal constraints.
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation of this object.
Overrides:
toString in class java.lang.Object


Copyright © 2000 Sun Microsystems, Inc. All rights reserved