FileDocCategorySizeDatePackage
AuthMechanism.javaAPI DocGlassfish v2 API4586Fri May 04 22:31:20 BST 2007com.sun.enterprise.deployment

AuthMechanism

public class AuthMechanism extends Descriptor
This class encapsulates the xml tags: description, auth-mech-type and credential-interface in the connector specification.
author
Sheetal Vartak

Fields Summary
private int
authMechVal
private String
credInterface
Constructors Summary
public AuthMechanism()
Default constructor.

public AuthMechanism(String description, int authMechVal, String credInterface)
Initializes the data members.

param
description description
param
authMechVal authentication mechanism type.
param
credInterface credential interface type.

        super.setDescription(description);
      	this.authMechVal = authMechVal;
        this.credInterface = credInterface;
    
Methods Summary
public java.lang.StringgetAuthMechType()
Get the auth-mech-type

return
authMechVal the authentication mechanism type

        if(authMechVal == PoolManagerConstants.BASIC_PASSWORD)
	    return ConnectorTagNames.DD_BASIC_PASSWORD;
        else
            return ConnectorTagNames.DD_KERBEROS;
    
public intgetAuthMechVal()
Get the authentication mechanism value.

 
        return authMechVal;
    
public java.lang.StringgetCredentialInterface()
Get the credential interface.

return
credInterface the interface.

        return credInterface;
    
public java.lang.StringgetDescription()
Get the description

return
description.

        return super.getDescription();
    
public voidsetAuthMechVal(java.lang.String value)
Set the authentication mechanism value.

 
        if((value.trim()).equals(ConnectorTagNames.DD_BASIC_PASSWORD))
	    authMechVal = PoolManagerConstants.BASIC_PASSWORD;
        else if((value.trim()).equals(ConnectorTagNames.DD_KERBEROS))
	    authMechVal = PoolManagerConstants.KERBV5;
	else throw new IllegalArgumentException("Invalid auth-mech-type");// put this in localStrings...
    
public voidsetAuthMechVal(int value)
Set the authentication mechanism value.

 
        authMechVal = value;
    
public voidsetCredentialInterface(java.lang.String cred)
Set the credential interface.

param
cred the interface.

        credInterface = cred;
    
public voidsetDescription(java.lang.String description)
Sets the description

param
description.

        super.setDescription(description);