< prev index next >

## src/java.base/share/classes/java/security/PolicySpi.java

Print this page

     23  * questions.
     24  */
     25
     26
     27 package java.security;
     28
     29 /**
     30  * This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
     31  * for the {@code Policy} class.
     32  * All the abstract methods in this class must be implemented by each
     33  * service provider who wishes to supply a Policy implementation.
     34  *
     35  * <p> Subclass implementations of this abstract class must provide
     36  * a public constructor that takes a {@code Policy.Parameters}
     37  * object as an input parameter.  This constructor also must throw
     38  * an IllegalArgumentException if it does not understand the
     39  * {@code Policy.Parameters} input.
     40  *
     41  *
     42  * @since 1.6

     43  */
     44

     45 public abstract class PolicySpi {
     46
     47     /**
     48      * Constructor for subclasses to call.
     49      */
     50     public PolicySpi() {}
     51
     52     /**
     53      * Check whether the policy has granted a Permission to a ProtectionDomain.
     54      *
     55      * @param domain the ProtectionDomain to check.
     56      *
     57      * @param permission check whether this permission is granted to the
     58      *          specified domain.
     59      *
     60      * @return boolean true if the permission is granted to the domain.
     61      */
     62     protected abstract boolean engineImplies
     63         (ProtectionDomain domain, Permission permission);
     64
     23  * questions.
     24  */
     25
     26
     27 package java.security;
     28
     29 /**
     30  * This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
     31  * for the {@code Policy} class.
     32  * All the abstract methods in this class must be implemented by each
     33  * service provider who wishes to supply a Policy implementation.
     34  *
     35  * <p> Subclass implementations of this abstract class must provide
     36  * a public constructor that takes a {@code Policy.Parameters}
     37  * object as an input parameter.  This constructor also must throw
     38  * an IllegalArgumentException if it does not understand the
     39  * {@code Policy.Parameters} input.
     40  *
     41  *
     42  * @since 1.6
     43  * @deprecated This class is only useful in conjunction with
     44  *       {@linkplain SecurityManager the Security Manager}, which is deprecated
     45  *       and subject to removal in a future release. Consequently, this class
     46  *       is also deprecated and subject to removal. There is no replacement for
     47  *       the Security Manager or this class.
     48  */
     49
     50 @Deprecated(since="17", forRemoval=true)
     51 public abstract class PolicySpi {
     52
     53     /**
     54      * Constructor for subclasses to call.
     55      */
     56     public PolicySpi() {}
     57
     58     /**
     59      * Check whether the policy has granted a Permission to a ProtectionDomain.
     60      *
     61      * @param domain the ProtectionDomain to check.
     62      *
     63      * @param permission check whether this permission is granted to the
     64      *          specified domain.
     65      *
     66      * @return boolean true if the permission is granted to the domain.
     67      */
     68     protected abstract boolean engineImplies
     69         (ProtectionDomain domain, Permission permission);
     70

< prev index next >