Methods Summary |
---|
public boolean | equals(java.lang.Object other)Compares this PasswordCredential with the specified object for
equality. The two PasswordCredential instances are the same if
they are equal in username and password.
if (!(other instanceof PasswordCredential))
return false;
PasswordCredential pc = (PasswordCredential)other;
if (!(userName.equals(pc.userName)))
return false;
if (password.length != pc.password.length)
return false;
for (int i = 0; i < password.length;i++) {
if (password[i] != pc.password[i])
return false;
}
return true;
|
public javax.resource.spi.ManagedConnectionFactory | getManagedConnectionFactory()Gets the target ManagedConnectionFactory for which the user name and
password has been set by the application server. A ManagedConnection-
Factory uses this field to find out whether PasswordCredential should
be used by it for sign-on to the target EIS instance.
return mcf;
|
public char[] | getPassword()Returns the user password.
Note that this method returns a reference to the password. It is
the caller's responsibility to zero out the password information after
it is no longer needed.
return password;
|
public java.lang.String | getUserName()Returns the user name.
return userName;
|
public int | hashCode()Returns the hash code for this PasswordCredential
String s = userName;
s += new String(password);
return s.hashCode();
|
public void | setManagedConnectionFactory(javax.resource.spi.ManagedConnectionFactory mcf)Sets the target ManagedConenctionFactory instance for which the user
name and password has been set by the application server.
this.mcf = mcf;
|