FileDocCategorySizeDatePackage
NTNumericCredential.javaAPI DocJava SE 5 API2664Fri Aug 26 14:56:14 BST 2005com.sun.security.auth

NTNumericCredential

public class NTNumericCredential extends Object

This class abstracts an NT security token and provides a mechanism to do same-process security impersonation.

version
1.14, 12/19/03

Fields Summary
private long
impersonationToken
Constructors Summary
public NTNumericCredential(long token)
Create an NTNumericCredential with an integer value.

param
token the Windows NT security token for this user.

        this.impersonationToken = token;
    
Methods Summary
public booleanequals(java.lang.Object o)
Compares the specified Object with this NTNumericCredential for equality. Returns true if the given object is also a NTNumericCredential and the two NTNumericCredentials represent the same NT security token.

param
o Object to be compared for equality with this NTNumericCredential.
return
true if the specified Object is equal equal to this NTNumericCredential.

	if (o == null)
	    return false;

        if (this == o)
            return true;
 
        if (!(o instanceof NTNumericCredential))
            return false;
        NTNumericCredential that = (NTNumericCredential)o;

	if (impersonationToken == that.getToken())
	    return true;
	return false;
    
public longgetToken()
Return an integer representation of this NTNumericCredential.

return
an integer representation of this NTNumericCredential.

        return impersonationToken;
    
public inthashCode()
Return a hash code for this NTNumericCredential.

return
a hash code for this NTNumericCredential.

	return (int)this.impersonationToken;
    
public java.lang.StringtoString()
Return a string representation of this NTNumericCredential.

return
a string representation of this NTNumericCredential.

	java.text.MessageFormat form = new java.text.MessageFormat
		(sun.security.util.ResourcesMgr.getString
			("NTNumericCredential: name",
			"sun.security.util.AuthResources"));
	Object[] source = {Long.toString(impersonationToken)};
	return form.format(source);