sun.security.mule.jgss
Class GSSCredentialImpl

java.lang.Object
  extended by sun.security.mule.jgss.GSSCredentialImpl
All Implemented Interfaces:
Cloneable, GSSCredential

public class GSSCredentialImpl
extends Object
implements GSSCredential


Field Summary
 
Fields inherited from interface org.ietf.jgss.GSSCredential
ACCEPT_ONLY, DEFAULT_LIFETIME, INDEFINITE_LIFETIME, INITIATE_AND_ACCEPT, INITIATE_ONLY
 
Constructor Summary
GSSCredentialImpl(GSSManagerImpl gssManager, GSSCredentialSpi mechElement)
           
 
Method Summary
 void add(GSSName name, int initLifetime, int acceptLifetime, Oid mech, int usage)
           
 void dispose()
           
 boolean equals(Object another)
           
 GSSCredentialSpi getElement(Oid mechOid, boolean initiate)
          Returns the specified mechanism's credential-element.
 Oid[] getMechs()
           
 GSSName getName()
           
 GSSName getName(Oid mech)
           
 int getRemainingAcceptLifetime(Oid mech)
           
 int getRemainingInitLifetime(Oid mech)
           
 int getRemainingLifetime()
          Returns the remaining lifetime of this credential.
 int getUsage()
          Returns the usage mode for this credential.
 int getUsage(Oid mech)
           
 int hashCode()
          Returns a hashcode value for this GSSCredential.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GSSCredentialImpl

public GSSCredentialImpl(GSSManagerImpl gssManager,
                         GSSCredentialSpi mechElement)
                  throws GSSException
Throws:
GSSException
Method Detail

dispose

public void dispose()
             throws GSSException
Specified by:
dispose in interface GSSCredential
Throws:
GSSException

getName

public GSSName getName()
                throws GSSException
Specified by:
getName in interface GSSCredential
Throws:
GSSException

getName

public GSSName getName(Oid mech)
                throws GSSException
Specified by:
getName in interface GSSCredential
Throws:
GSSException

getRemainingLifetime

public int getRemainingLifetime()
                         throws GSSException
Returns the remaining lifetime of this credential. The remaining lifetime is defined as the minimum lifetime, either for initiate or for accept, across all elements contained in it. Not terribly useful, but required by GSS-API.

Specified by:
getRemainingLifetime in interface GSSCredential
Throws:
GSSException

getRemainingInitLifetime

public int getRemainingInitLifetime(Oid mech)
                             throws GSSException
Specified by:
getRemainingInitLifetime in interface GSSCredential
Throws:
GSSException

getRemainingAcceptLifetime

public int getRemainingAcceptLifetime(Oid mech)
                               throws GSSException
Specified by:
getRemainingAcceptLifetime in interface GSSCredential
Throws:
GSSException

getUsage

public int getUsage()
             throws GSSException
Returns the usage mode for this credential. Returns INITIATE_AND_ACCEPT if any one element contained in it supports INITIATE_AND_ACCEPT or if two different elements exist where one support INITIATE_ONLY and the other supports ACCEPT_ONLY.

Specified by:
getUsage in interface GSSCredential
Throws:
GSSException

getUsage

public int getUsage(Oid mech)
             throws GSSException
Specified by:
getUsage in interface GSSCredential
Throws:
GSSException

getMechs

public Oid[] getMechs()
               throws GSSException
Specified by:
getMechs in interface GSSCredential
Throws:
GSSException

add

public void add(GSSName name,
                int initLifetime,
                int acceptLifetime,
                Oid mech,
                int usage)
         throws GSSException
Specified by:
add in interface GSSCredential
Throws:
GSSException

equals

public boolean equals(Object another)
Specified by:
equals in interface GSSCredential
Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hashcode value for this GSSCredential.

Specified by:
hashCode in interface GSSCredential
Overrides:
hashCode in class Object
Returns:
a hashCode value

getElement

public GSSCredentialSpi getElement(Oid mechOid,
                                   boolean initiate)
                            throws GSSException
Returns the specified mechanism's credential-element.

Parameters:
mechOid - - the oid for mechanism to retrieve
throwExcep - - boolean indicating if the function is to throw exception or return null when element is not found.
Returns:
mechanism credential object
Throws:
GSSException - of invalid mechanism

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.