java.lang.Object
com.sun.net.httpserver.HttpPrincipal
- 
Constructor SummaryConstructorsConstructorDescriptionHttpPrincipal(String username, String realm) Creates aHttpPrincipalfrom the givenusernameandrealm.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanCompare two instances ofHttpPrincipal.getName()Returns the contents of this principal in the form realm:username.getRealm()Returns therealmthis object was created with.Returns theusernamethis object was created with.inthashCode()Returns a hashcode for thisHttpPrincipal.toString()Returns the same string asgetName().
- 
Constructor Details- 
HttpPrincipalCreates aHttpPrincipalfrom the givenusernameandrealm.- Parameters:
- username- the name of the user within the realm
- realm- the realm for this user
- Throws:
- NullPointerException- if either username or realm are- null
 
 
- 
- 
Method Details- 
equalsCompare two instances ofHttpPrincipal. Returnstrueif another is an instance ofHttpPrincipal, and its username and realm are equal to this object's username and realm. Returnsfalseotherwise.
- 
getName
- 
getUsernameReturns theusernamethis object was created with.- Returns:
- the name of the user associated with this object
 
- 
getRealmReturns therealmthis object was created with.- Returns:
- the realm associated with this object
 
- 
hashCode
- 
toString
 
-