org.nees.util.grid
Class CredentialFacade

java.lang.Object
  extended byorg.nees.util.grid.CredentialFacade

public class CredentialFacade
extends java.lang.Object

This facade wraps grid credentials and provides some utility methods.

Typical Usage:

Used to manage a grid credential and get information about it, such as the subject.

Life Cycle:

Created either to represent the default credential or by passing a credential to manage. There are also some static utility methods.


Constructor Summary
CredentialFacade()
          Create a facade for the default credential.
CredentialFacade(org.ietf.jgss.GSSCredential realCredential)
          Create a facade for the given credential.
 
Method Summary
 org.ietf.jgss.GSSCredential getCredential()
          Get the credential represented by this facade.
static org.ietf.jgss.GSSCredential getDefaultCredential()
          Get the default credential.
 int getRemainingLifetime()
          Get the credential's remaining lifetime in seconds.
 java.lang.String getSubject()
          Get the subject of the credential represented by this facade.
static java.lang.String getSubject(org.ietf.jgss.GSSCredential cred)
          Get the subject of a credential.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CredentialFacade

public CredentialFacade()
                 throws CredentialException
Create a facade for the default credential.


CredentialFacade

public CredentialFacade(org.ietf.jgss.GSSCredential realCredential)
Create a facade for the given credential.

Parameters:
realCredential - the credential.
Method Detail

getDefaultCredential

public static org.ietf.jgss.GSSCredential getDefaultCredential()
                                                        throws java.lang.Exception
Get the default credential.

Returns:
the default credential.
Throws:
java.lang.Exception

getSubject

public static java.lang.String getSubject(org.ietf.jgss.GSSCredential cred)
                                   throws CredentialException
Get the subject of a credential.

Parameters:
cred - the credential
Returns:
the subject.
Throws:
CredentialException

getCredential

public org.ietf.jgss.GSSCredential getCredential()
Get the credential represented by this facade.

Returns:
the credential.

getSubject

public java.lang.String getSubject()
                            throws CredentialException
Get the subject of the credential represented by this facade.

Returns:
the subject
Throws:
CredentialException

getRemainingLifetime

public int getRemainingLifetime()
                         throws CredentialException
Get the credential's remaining lifetime in seconds.

Throws:
CredentialException