com.sun.jini.discovery
Class ClientPermissionChecker
java.lang.Object
   com.sun.jini.discovery.ClientPermissionChecker
com.sun.jini.discovery.ClientPermissionChecker
- All Implemented Interfaces: 
- ClientSubjectChecker
- public class ClientPermissionChecker 
- extends Object- implements ClientSubjectChecker
Implementation of ClientSubjectChecker that approves or rejects
 client subjects based on whether or not they have been granted a particular
 permission.
- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
 
| Method Summary | 
|  void | checkClientSubject(Subject subject)Checks whether or not to permit exchanging or accepting data with/from a
 client authenticated as the given subject, by testing if the subject has
 been granted the permission that this instance was constructed with.
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ClientPermissionChecker
public ClientPermissionChecker(Permission permission)
- Creates instance that checks if client subjects have been granted the
 specified permission.
 
- Parameters:
- permission- the permission to use in client subject checks
- Throws:
- NullPointerException- if- permissionis- null
 
checkClientSubject
public void checkClientSubject(Subject subject)
- Checks whether or not to permit exchanging or accepting data with/from a
 client authenticated as the given subject, by testing if the subject has
 been granted the permission that this instance was constructed with.  If
 a security manager is installed, a ProtectionDomainis
 constructed with an emptyCodeSource(nulllocation
 and certificates),nullpermissions,nullclass loader, and the principals from the given client subject (if any),
 and theimpliesmethod of that
 protection domain is invoked with the specified permission.  Iftrueis returned, this method returns normally, otherwise aSecurityExceptionis thrown.  If no security manager is
 installed, this method returns normally.  The given client subject must
 be read-only if non-null.
 
- 
- Specified by:
- checkClientSubjectin interface- ClientSubjectChecker
 
- 
- Parameters:
- subject- the client subject to check
- Throws:
- SecurityException- if the client subject check fails
- IllegalArgumentException- if the given subject is not read-only
 
Copyright © GigaSpaces.