org.gridlab.gat.security
Class CredentialSecurityContext

java.lang.Object
  extended by org.gridlab.gat.security.SecurityContext
      extended by org.gridlab.gat.security.CredentialSecurityContext
All Implemented Interfaces:
Cloneable

public class CredentialSecurityContext
extends SecurityContext

A container for security Information based upon credentials stored in an object. Such an object can be the credential itself (e.g. a GSSCredential for Globus) or an object representation that can be converted to the credential (for instance a String representation of Globus certificate, which can be converted to a GSSCredential, for optimization reasons one can store the converted credential again in the CredentialSecurityContext).


Constructor Summary
CredentialSecurityContext()
          Constructor of the CredentialSecurityContext.
CredentialSecurityContext(Object credential)
          Constructor of the CredentialSecurityContext.
 
Method Summary
 Object clone()
          Returns a clone of this context.
 boolean equals(Object obj)
          Check two SecurityContexts for equality.
 Object getCredential()
          Gets the credential associated with this security context.
 int hashCode()
          Gets the hashcode of this security context
 void setCredential(Object credential)
          Sets the credential associated with this security context.
 String toString()
           
 
Methods inherited from class org.gridlab.gat.security.SecurityContext
addNote, containsNoteKey, getDataObject, getNoteValue, getPassword, getUsername, isValidFor, putDataObject, removeDataObject, setPassword, setUsername
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CredentialSecurityContext

public CredentialSecurityContext()
Constructor of the CredentialSecurityContext. Use setCredential(Object) to set the credential object.


CredentialSecurityContext

public CredentialSecurityContext(Object credential)
Constructor of the CredentialSecurityContext.

Parameters:
credential - creates a CredentialSecurityContext with the supplied credential
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Returns a clone of this context.

Specified by:
clone in class SecurityContext
Returns:
the clone of this security context
Throws:
CloneNotSupportedException

equals

public boolean equals(Object obj)
Check two SecurityContexts for equality.

Specified by:
equals in class SecurityContext
Parameters:
obj - the object to compare this with
Returns:
true if the objects are semantically equal

hashCode

public int hashCode()
Gets the hashcode of this security context

Specified by:
hashCode in class SecurityContext
Returns:
The hashcode of this object

getCredential

public Object getCredential()
Gets the credential associated with this security context.

Returns:
The credential associated with this security context.

setCredential

public void setCredential(Object credential)
Sets the credential associated with this security context.

Parameters:
credential - The credential to be associated with this security context.

toString

public String toString()
Overrides:
toString in class Object