Retrieve the JAAS Security principals associated with a subject

WARNING - TOPIC NOT WRITTEN - TOPIC ID: 538

This topic has not yet been written. The content below is from the topic description.
To retrieve the principals associated with a subject, two methods are available: public Set getPrincipals() {...} public Set getPrincipals(Class c) {...} getPrincipals() returns all principals contained in the subject. getPrincipals(Class c) returns only those principals that are instances of class c or one of its subclasses. An empty set is returned if the subject has no matching principals. Note that the java.security.acl.Group interface is a subinterface of java.security.Principal, so an instance in the principals set may represent a logical grouping of other principals or groups of principals.