< prev index next >

## src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java

Print this page

     22  * or visit www.oracle.com if you need additional information or have any
     23  * questions.
     24  */
     25
     26 package javax.security.auth;
     27
     28 import java.security.AccessController;
     29 import java.security.Principal;
     30 import java.security.PrivilegedAction;
     31 import java.security.ProtectionDomain;
     32 import java.util.Set;
     33 import java.util.WeakHashMap;
     34 import java.lang.ref.WeakReference;
     35
     36 /**
     37  * A {@code SubjectDomainCombiner} updates ProtectionDomains
     38  * with Principals from the {@code Subject} associated with this
     39  * {@code SubjectDomainCombiner}.
     40  *
     41  * @since 1.4

     42  */

     43 public class SubjectDomainCombiner implements java.security.DomainCombiner {
     44
     45     private Subject subject;
     46     private WeakKeyValueMap<ProtectionDomain, ProtectionDomain> cachedPDs =
     47                 new WeakKeyValueMap<>();
     48     private Set<Principal> principalSet;
     49     private Principal[] principals;
     50
     51     private static final sun.security.util.Debug debug =
     52         sun.security.util.Debug.getInstance("combiner",
     53                                         "\t[SubjectDomainCombiner]");
     54
     55     /**
     56      * Associate the provided {@code Subject} with this
     57      * {@code SubjectDomainCombiner}.
     58      *
     59      * @param subject the {@code Subject} to be associated with
     60      *          this {@code SubjectDomainCombiner}.
     61      */
     62     public SubjectDomainCombiner(Subject subject) {
     22  * or visit www.oracle.com if you need additional information or have any
     23  * questions.
     24  */
     25
     26 package javax.security.auth;
     27
     28 import java.security.AccessController;
     29 import java.security.Principal;
     30 import java.security.PrivilegedAction;
     31 import java.security.ProtectionDomain;
     32 import java.util.Set;
     33 import java.util.WeakHashMap;
     34 import java.lang.ref.WeakReference;
     35
     36 /**
     37  * A {@code SubjectDomainCombiner} updates ProtectionDomains
     38  * with Principals from the {@code Subject} associated with this
     39  * {@code SubjectDomainCombiner}.
     40  *
     41  * @since 1.4
     42  * @deprecated This class is only useful in conjunction with
     43  *       {@linkplain SecurityManager the Security Manager}, which is deprecated
     44  *       and subject to removal in a future release. Consequently, this class
     45  *       is also deprecated and subject to removal. There is no replacement for
     46  *       the Security Manager or this class.
     47  */
     48 @Deprecated(since="17", forRemoval=true)
     49 public class SubjectDomainCombiner implements java.security.DomainCombiner {
     50
     51     private Subject subject;
     52     private WeakKeyValueMap<ProtectionDomain, ProtectionDomain> cachedPDs =
     53                 new WeakKeyValueMap<>();
     54     private Set<Principal> principalSet;
     55     private Principal[] principals;
     56
     57     private static final sun.security.util.Debug debug =
     58         sun.security.util.Debug.getInstance("combiner",
     59                                         "\t[SubjectDomainCombiner]");
     60
     61     /**
     62      * Associate the provided {@code Subject} with this
     63      * {@code SubjectDomainCombiner}.
     64      *
     65      * @param subject the {@code Subject} to be associated with
     66      *          this {@code SubjectDomainCombiner}.
     67      */
     68     public SubjectDomainCombiner(Subject subject) {

< prev index next >