33 * <p> The comparison is achieved via the <code>implies</code> method.
34 * The implementation of the <code>implies</code> method determines
35 * whether this object "implies" the specified <code>Subject</code>.
36 * One example application of this method may be for
37 * a "group" object to imply a particular <code>Subject</code>
38 * if that <code>Subject</code> belongs to the group.
39 * Another example application of this method would be for
40 * "role" object to imply a particular <code>Subject</code>
41 * if that <code>Subject</code> is currently acting in that role.
42 *
43 * <p> Although classes that implement this interface typically
44 * also implement the <code>java.security.Principal</code> interface,
45 * it is not required. In other words, classes may implement the
46 * <code>java.security.Principal</code> interface by itself,
47 * the <code>PrincipalComparator</code> interface by itself,
48 * or both at the same time.
49 *
50 * @see java.security.Principal
51 * @see javax.security.auth.Subject
52 */
53 public interface PrincipalComparator {
54 /**
55 * Check if the specified <code>Subject</code> is implied by
56 * this object.
57 *
58 * <p>
59 *
60 * @return true if the specified <code>Subject</code> is implied by
61 * this object, or false otherwise.
62 */
63 boolean implies(javax.security.auth.Subject subject);
64 }
|
33 * <p> The comparison is achieved via the <code>implies</code> method.
34 * The implementation of the <code>implies</code> method determines
35 * whether this object "implies" the specified <code>Subject</code>.
36 * One example application of this method may be for
37 * a "group" object to imply a particular <code>Subject</code>
38 * if that <code>Subject</code> belongs to the group.
39 * Another example application of this method would be for
40 * "role" object to imply a particular <code>Subject</code>
41 * if that <code>Subject</code> is currently acting in that role.
42 *
43 * <p> Although classes that implement this interface typically
44 * also implement the <code>java.security.Principal</code> interface,
45 * it is not required. In other words, classes may implement the
46 * <code>java.security.Principal</code> interface by itself,
47 * the <code>PrincipalComparator</code> interface by itself,
48 * or both at the same time.
49 *
50 * @see java.security.Principal
51 * @see javax.security.auth.Subject
52 */
53 @jdk.Supported
54 public interface PrincipalComparator {
55 /**
56 * Check if the specified <code>Subject</code> is implied by
57 * this object.
58 *
59 * <p>
60 *
61 * @return true if the specified <code>Subject</code> is implied by
62 * this object, or false otherwise.
63 */
64 boolean implies(javax.security.auth.Subject subject);
65 }
|