|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个 CLASS | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
javax.resource.spi.security Class PasswordCredential
java.lang.Objectjavax.resource.spi.security.PasswordCredential
- 所有已实现的接口:
- Serializable
public final class PasswordCredential
- extends Object
- implements Serializable
The class PasswordCredential acts as a holder for username and password.
- 从以下版本开始:
- 0.6
- 版本:
- 0.6
- 作者:
- Rahul Sharma
- 另请参见:
ManagedConnectionFactory
, Serialized Form
构造器摘要 | |
---|---|
PasswordCredential(String userName,
char[] password)
Creates a new PasswordCredential object from the given
user name and password. |
方法摘要 | |
---|---|
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. |
类方法继承 java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
构造器详细信息 |
---|
PasswordCredential
public PasswordCredential(String userName, char[] password)
- Creates a new
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 password
方法详细信息 |
---|
getUserName
public String getUserName()
- Returns the user name.
- 返回:
- the user name
getPassword
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.
- 返回:
- the password
getManagedConnectionFactory
public 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.
- 返回:
- ManagedConnectionFactory instance for which user name and password have been specified
setManagedConnectionFactory
public void setManagedConnectionFactory(ManagedConnectionFactory mcf)
- Sets the target ManagedConenctionFactory instance for which the user
name and password has been set by the application server.
- 参数:
mcf
- ManagedConnectionFactory instance for which user name and password have been specified
equals
public boolean equals(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.
- 参数:
other
- Object to which PasswordCredential is to be compared- 返回:
- true if and if the specified object is a PasswordCredential whose username and password are equal to this instance.
hashCode
public int hashCode()
- Returns the hash code for this PasswordCredential
- 返回:
- hash code for this PasswordCredential
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个 CLASS | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.