PrincipalAuthKeypublic class PrincipalAuthKey extends Object implements SerializableThis class represents the key for security Maps.
This is used as key in storing the backend principals as value in the
security map in ConnectorRegistry |
Fields Summary |
---|
private String | rarName_ | private String | poolName_ | private String | principalName_ | private String | userGroup_ | static Logger | _logger |
Constructors Summary |
---|
public PrincipalAuthKey(String rarName, String poolName, String principalName, String userGroupName)Constructor
rarName_ = rarName;
poolName_ = poolName;
principalName_ = principalName;
userGroup_ = userGroupName;
_logger.log(Level.FINE,"Constructor: PrincipalAuthKey");
|
Methods Summary |
---|
public boolean | equals(java.lang.Object other)Checks for equality.
Overloaded equals() from Object class. Used when comparing strings
for equality.
if( other == null || !(other instanceof PrincipalAuthKey)) {
if ( _logger.isLoggable(Level.FINE) ) {
String msg = "equals method PrincipalAuthKey: parameter not ";
String msg1= "PrincipalAuthKey. Equals fails";
_logger.log(Level.FINE,msg+msg1);
}
return false;
}
PrincipalAuthKey otherkey = (PrincipalAuthKey)other;
if(isEqual(this.rarName_,otherkey.rarName_) &&
isEqual(this.poolName_,otherkey.poolName_) &&
isEqual(this.principalName_,otherkey.principalName_) &&
isEqual(this.userGroup_,otherkey.userGroup_)) {
_logger.log(Level.FINE,"equal method of PrincipalAuthKey succeeds");
return true;
} else {
_logger.log(Level.FINE,"equals method of PrincipalAuthKey fails");
return false;
}
| public int | hashCode()Generates Hashcode . Overloaded method from "Object" class.
return (rarName_+poolName_+principalName_+userGroup_).hashCode();
| private boolean | isEqual(java.lang.String in, java.lang.String out)Checks whether two strings are equal including the null string
cases.
if(in == null && out == null) {
return true;
}
if(in == null || out == null) {
return false;
}
return (out.equals(in));
|
|