public final class PasswordCredential extends Object implements Serializable
ManagedConnectionFactory, 
Serialized Form| Constructor and Description | 
|---|
| PasswordCredential(String userName,
                  char[] password)Creates a new  PasswordCredentialobject from the given
 user name and password. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object other)Compares this PasswordCredential with the specified object for 
  equality. | 
| ManagedConnectionFactory | getManagedConnectionFactory()Gets the target ManagedConnectionFactory for which the user name and 
  password has been set by the application server. | 
| char[] | getPassword()Returns the user password. | 
| String | getUserName()Returns the user name. | 
| int | hashCode()Returns the hash code for this PasswordCredential | 
| void | setManagedConnectionFactory(ManagedConnectionFactory mcf)Sets the target ManagedConenctionFactory instance for which the user 
   name and password has been set by the application server. | 
public PasswordCredential(String userName, char[] password)
PasswordCredential object from the given
 user name and password.
  Note that the given user password is cloned before it is stored in
 the new PasswordCredential object.
userName - the user namepassword - the user's passwordpublic String getUserName()
public char[] getPassword()
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.
public ManagedConnectionFactory getManagedConnectionFactory()
public void setManagedConnectionFactory(ManagedConnectionFactory mcf)
mcf - ManagedConnectionFactory instance for which user name
                   and password have been specifiedpublic boolean equals(Object other)
Copyright © 1996-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.