FileDocCategorySizeDatePackage
ClientSecurityInfo.javaAPI DocGlassfish v2 API3914Fri May 04 22:35:14 BST 2007com.sun.enterprise.resource

ClientSecurityInfo

public class ClientSecurityInfo extends Object
This class represents the client-specific information associated with a resource. Used for pool partitioning
author
Tony Ng

Fields Summary
private com.sun.enterprise.deployment.ResourcePrincipal
prin
private javax.resource.spi.ConnectionRequestInfo
info
private static final int
NULL_HASH_CODE
Constructors Summary
public ClientSecurityInfo(com.sun.enterprise.deployment.ResourcePrincipal prin)


       
        if (prin == null) {
            throw new NullPointerException("Principal is null");
        }
        this.prin = prin;
        this.info = null;
    
public ClientSecurityInfo(javax.resource.spi.ConnectionRequestInfo info)

        // info can be null
        this.prin = null;
        this.info = info;
    
Methods Summary
public booleanequals(java.lang.Object obj)

        if (this == obj) return true;
        if (obj == null) return false;
        if (obj instanceof ClientSecurityInfo) {
            ClientSecurityInfo other = (ClientSecurityInfo) obj;
            return ((isEqual(prin, other.prin)) &&
                    (isEqual(info, other.info)));
        }
        return false;
    
public javax.resource.spi.ConnectionRequestInfogetConnectionRequestInfo()

        return info;
    
public com.sun.enterprise.deployment.ResourcePrincipalgetPrincipal()

        return prin;
    
public inthashCode()

        int result = NULL_HASH_CODE;
        if (prin != null) {
            result = prin.hashCode();
        }
        if (info != null) {
            result += info.hashCode();
        }
        return result;
    
private booleanisEqual(java.lang.Object a, java.lang.Object b)

        if (a == null) {
            return (b == null);
        } else {
            return (a.equals(b));
        }
    
public java.lang.StringtoString()

        return "ClientSecurityInfo: prin=" + prin + " info="+info;