IT. Expert System.

Java Enterprise Edition (EE)

PasswordCredential


javax.resource.spi.security
Class PasswordCredential

java.lang.Object
  javax.resource.spi.security.PasswordCredential
All Implemented Interfaces:
java.io.Serializable
public final class PasswordCredential
extends java.lang.Object
implements java.io.Serializable

The class PasswordCredential acts as a holder for username and password.

Since:
0.6
Version:
0.6
Author:
Rahul Sharma
See Also:
ManagedConnectionFactory, Serialized Form

Constructor Summary
PasswordCredential(java.lang.String userName, char[] password)
          Creates a new PasswordCredential object from the given user name and password.
 
Method Summary
 boolean equals(java.lang.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.
 java.lang.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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordCredential

public PasswordCredential(java.lang.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.

Parameters:
userName - the user name
password - the user's password
Method Detail

getUserName

public java.lang.String getUserName()
Returns the user name.

Returns:
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.

Returns:
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.

Returns:
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.

Parameters:
mcf - ManagedConnectionFactory instance for which user name and password have been specified

equals

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.

Overrides:
equals in class java.lang.Object
Parameters:
other - Object to which PasswordCredential is to be compared
Returns:
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

Overrides:
hashCode in class java.lang.Object
Returns:
hash code for this PasswordCredential


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 955 / . Delta: 0.01983 с