org.ietf.jgss
Class GSSException

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Exception sample code for java.lang.Exception definition code for java.lang.Exception 
          extended by org.ietf.jgss.GSSException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class GSSException
extends Exception sample code for java.lang.Exception definition code for java.lang.Exception

This exception is thrown whenever a GSS-API error occurs, including any mechanism specific error. It may contain both the major and the minor GSS-API status codes. Major error codes are those defined at the GSS-API level in this class. Minor error codes are mechanism specific error codes that can provide additional information. The underlying mechanism implementation is responsible for setting appropriate minor status codes when throwing this exception. Aside from delivering the numeric error codes to the caller, this class performs the mapping from their numeric values to textual representations.

Since:
1.4
See Also:
Serialized Form

Field Summary
static int BAD_BINDINGS sample code for org.ietf.jgss.GSSException.BAD_BINDINGS definition code for org.ietf.jgss.GSSException.BAD_BINDINGS
          Channel bindings mismatch.
static int BAD_MECH sample code for org.ietf.jgss.GSSException.BAD_MECH definition code for org.ietf.jgss.GSSException.BAD_MECH
          Unsupported mechanism requested.
static int BAD_MIC sample code for org.ietf.jgss.GSSException.BAD_MIC definition code for org.ietf.jgss.GSSException.BAD_MIC
          Token had invalid integrity check.
static int BAD_NAME sample code for org.ietf.jgss.GSSException.BAD_NAME definition code for org.ietf.jgss.GSSException.BAD_NAME
          Invalid name provided.
static int BAD_NAMETYPE sample code for org.ietf.jgss.GSSException.BAD_NAMETYPE definition code for org.ietf.jgss.GSSException.BAD_NAMETYPE
          Name of unsupported type provided.
static int BAD_QOP sample code for org.ietf.jgss.GSSException.BAD_QOP definition code for org.ietf.jgss.GSSException.BAD_QOP
          Unsupported QOP value.
static int BAD_STATUS sample code for org.ietf.jgss.GSSException.BAD_STATUS definition code for org.ietf.jgss.GSSException.BAD_STATUS
          Invalid status code.
static int CONTEXT_EXPIRED sample code for org.ietf.jgss.GSSException.CONTEXT_EXPIRED definition code for org.ietf.jgss.GSSException.CONTEXT_EXPIRED
          Security context expired.
static int CREDENTIALS_EXPIRED sample code for org.ietf.jgss.GSSException.CREDENTIALS_EXPIRED definition code for org.ietf.jgss.GSSException.CREDENTIALS_EXPIRED
          Expired credentials.
static int DEFECTIVE_CREDENTIAL sample code for org.ietf.jgss.GSSException.DEFECTIVE_CREDENTIAL definition code for org.ietf.jgss.GSSException.DEFECTIVE_CREDENTIAL
          Defective credentials.
static int DEFECTIVE_TOKEN sample code for org.ietf.jgss.GSSException.DEFECTIVE_TOKEN definition code for org.ietf.jgss.GSSException.DEFECTIVE_TOKEN
          Defective token.
static int DUPLICATE_ELEMENT sample code for org.ietf.jgss.GSSException.DUPLICATE_ELEMENT definition code for org.ietf.jgss.GSSException.DUPLICATE_ELEMENT
          Duplicate credential element requested.
static int DUPLICATE_TOKEN sample code for org.ietf.jgss.GSSException.DUPLICATE_TOKEN definition code for org.ietf.jgss.GSSException.DUPLICATE_TOKEN
          The token was a duplicate of an earlier token.
static int FAILURE sample code for org.ietf.jgss.GSSException.FAILURE definition code for org.ietf.jgss.GSSException.FAILURE
          General failure, unspecified at GSS-API level.
static int GAP_TOKEN sample code for org.ietf.jgss.GSSException.GAP_TOKEN definition code for org.ietf.jgss.GSSException.GAP_TOKEN
          An expected per-message token was not received.
static int NAME_NOT_MN sample code for org.ietf.jgss.GSSException.NAME_NOT_MN definition code for org.ietf.jgss.GSSException.NAME_NOT_MN
          Name contains multi-mechanism elements.
static int NO_CONTEXT sample code for org.ietf.jgss.GSSException.NO_CONTEXT definition code for org.ietf.jgss.GSSException.NO_CONTEXT
          Invalid security context.
static int NO_CRED sample code for org.ietf.jgss.GSSException.NO_CRED definition code for org.ietf.jgss.GSSException.NO_CRED
          Invalid credentials.
static int OLD_TOKEN sample code for org.ietf.jgss.GSSException.OLD_TOKEN definition code for org.ietf.jgss.GSSException.OLD_TOKEN
          The token's validity period has expired.
static int UNAUTHORIZED sample code for org.ietf.jgss.GSSException.UNAUTHORIZED definition code for org.ietf.jgss.GSSException.UNAUTHORIZED
          Operation unauthorized.
static int UNAVAILABLE sample code for org.ietf.jgss.GSSException.UNAVAILABLE definition code for org.ietf.jgss.GSSException.UNAVAILABLE
          Operation unavailable.
static int UNSEQ_TOKEN sample code for org.ietf.jgss.GSSException.UNSEQ_TOKEN definition code for org.ietf.jgss.GSSException.UNSEQ_TOKEN
          A later token has already been processed.
 
Constructor Summary
GSSException sample code for org.ietf.jgss.GSSException.GSSException(int) definition code for org.ietf.jgss.GSSException.GSSException(int) (int majorCode)
          Creates a GSSException object with a specified major code.
GSSException sample code for org.ietf.jgss.GSSException.GSSException(int, int, java.lang.String) definition code for org.ietf.jgss.GSSException.GSSException(int, int, java.lang.String) (int majorCode, int minorCode, String sample code for java.lang.String definition code for java.lang.String  minorString)
          Creates a GSSException object with the specified major code, minor code, and minor code textual explanation.
 
Method Summary
 int getMajor sample code for org.ietf.jgss.GSSException.getMajor() definition code for org.ietf.jgss.GSSException.getMajor() ()
          Returns the GSS-API level major error code for the problem causing this exception to be thrown.
 String sample code for java.lang.String definition code for java.lang.String getMajorString sample code for org.ietf.jgss.GSSException.getMajorString() definition code for org.ietf.jgss.GSSException.getMajorString() ()
          Returns a string explaining the GSS-API level major error code in this exception.
 String sample code for java.lang.String definition code for java.lang.String getMessage sample code for org.ietf.jgss.GSSException.getMessage() definition code for org.ietf.jgss.GSSException.getMessage() ()
          Returns a textual representation of both the major and the minor status codes.
 int getMinor sample code for org.ietf.jgss.GSSException.getMinor() definition code for org.ietf.jgss.GSSException.getMinor() ()
          Returns the mechanism level error code for the problem causing this exception to be thrown.
 String sample code for java.lang.String definition code for java.lang.String getMinorString sample code for org.ietf.jgss.GSSException.getMinorString() definition code for org.ietf.jgss.GSSException.getMinorString() ()
          Returns a string explaining the mechanism specific error code.
 void setMinor sample code for org.ietf.jgss.GSSException.setMinor(int, java.lang.String) definition code for org.ietf.jgss.GSSException.setMinor(int, java.lang.String) (int minorCode, String sample code for java.lang.String definition code for java.lang.String  message)
          Used by the exception thrower to set the mechanism level minor error code and its string explanation.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for org.ietf.jgss.GSSException.toString() definition code for org.ietf.jgss.GSSException.toString() ()
          Returns a textual representation of both the major and the minor status codes.
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getCause sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , initCause sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

BAD_BINDINGS sample code for org.ietf.jgss.GSSException.BAD_BINDINGS

public static final int BAD_BINDINGS
Channel bindings mismatch.

See Also:
Constant Field Values

BAD_MECH sample code for org.ietf.jgss.GSSException.BAD_MECH

public static final int BAD_MECH
Unsupported mechanism requested.

See Also:
Constant Field Values

BAD_NAME sample code for org.ietf.jgss.GSSException.BAD_NAME

public static final int BAD_NAME
Invalid name provided.

See Also:
Constant Field Values

BAD_NAMETYPE sample code for org.ietf.jgss.GSSException.BAD_NAMETYPE

public static final int BAD_NAMETYPE
Name of unsupported type provided.

See Also:
Constant Field Values

BAD_STATUS sample code for org.ietf.jgss.GSSException.BAD_STATUS

public static final int BAD_STATUS
Invalid status code.

See Also:
Constant Field Values

BAD_MIC sample code for org.ietf.jgss.GSSException.BAD_MIC

public static final int BAD_MIC
Token had invalid integrity check.

See Also:
Constant Field Values

CONTEXT_EXPIRED sample code for org.ietf.jgss.GSSException.CONTEXT_EXPIRED

public static final int CONTEXT_EXPIRED
Security context expired.

See Also:
Constant Field Values

CREDENTIALS_EXPIRED sample code for org.ietf.jgss.GSSException.CREDENTIALS_EXPIRED

public static final int CREDENTIALS_EXPIRED
Expired credentials.

See Also:
Constant Field Values

DEFECTIVE_CREDENTIAL sample code for org.ietf.jgss.GSSException.DEFECTIVE_CREDENTIAL

public static final int DEFECTIVE_CREDENTIAL
Defective credentials.

See Also:
Constant Field Values

DEFECTIVE_TOKEN sample code for org.ietf.jgss.GSSException.DEFECTIVE_TOKEN

public static final int DEFECTIVE_TOKEN
Defective token.

See Also:
Constant Field Values

FAILURE sample code for org.ietf.jgss.GSSException.FAILURE

public static final int FAILURE
General failure, unspecified at GSS-API level.

See Also:
Constant Field Values

NO_CONTEXT sample code for org.ietf.jgss.GSSException.NO_CONTEXT

public static final int NO_CONTEXT
Invalid security context.

See Also:
Constant Field Values

NO_CRED sample code for org.ietf.jgss.GSSException.NO_CRED

public static final int NO_CRED
Invalid credentials.

See Also:
Constant Field Values

BAD_QOP sample code for org.ietf.jgss.GSSException.BAD_QOP

public static final int BAD_QOP
Unsupported QOP value.

See Also:
Constant Field Values

UNAUTHORIZED sample code for org.ietf.jgss.GSSException.UNAUTHORIZED

public static final int UNAUTHORIZED
Operation unauthorized.

See Also:
Constant Field Values

UNAVAILABLE sample code for org.ietf.jgss.GSSException.UNAVAILABLE

public static final int UNAVAILABLE
Operation unavailable.

See Also:
Constant Field Values

DUPLICATE_ELEMENT sample code for org.ietf.jgss.GSSException.DUPLICATE_ELEMENT

public static final int DUPLICATE_ELEMENT
Duplicate credential element requested.

See Also:
Constant Field Values

NAME_NOT_MN sample code for org.ietf.jgss.GSSException.NAME_NOT_MN

public static final int NAME_NOT_MN
Name contains multi-mechanism elements.

See Also:
Constant Field Values

DUPLICATE_TOKEN sample code for org.ietf.jgss.GSSException.DUPLICATE_TOKEN

public static final int DUPLICATE_TOKEN
The token was a duplicate of an earlier token. This is a fatal error code that may occur during context establishment. It is not used to indicate supplementary status values. The MessageProp object is used for that purpose.

See Also:
Constant Field Values

OLD_TOKEN sample code for org.ietf.jgss.GSSException.OLD_TOKEN

public static final int OLD_TOKEN
The token's validity period has expired. This is a fatal error code that may occur during context establishment. It is not used to indicate supplementary status values. The MessageProp object is used for that purpose.

See Also:
Constant Field Values

UNSEQ_TOKEN sample code for org.ietf.jgss.GSSException.UNSEQ_TOKEN

public static final int UNSEQ_TOKEN
A later token has already been processed. This is a fatal error code that may occur during context establishment. It is not used to indicate supplementary status values. The MessageProp object is used for that purpose.

See Also:
Constant Field Values

GAP_TOKEN sample code for org.ietf.jgss.GSSException.GAP_TOKEN

public static final int GAP_TOKEN
An expected per-message token was not received. This is a fatal error code that may occur during context establishment. It is not used to indicate supplementary status values. The MessageProp object is used for that purpose.

See Also:
Constant Field Values
Constructor Detail

GSSException sample code for org.ietf.jgss.GSSException(int) definition code for org.ietf.jgss.GSSException(int)

public GSSException(int majorCode)
Creates a GSSException object with a specified major code.

Parameters:
majorCode - the The GSS error code for the problem causing this exception to be thrown.

GSSException sample code for org.ietf.jgss.GSSException(int, int, java.lang.String) definition code for org.ietf.jgss.GSSException(int, int, java.lang.String)

public GSSException(int majorCode,
                    int minorCode,
                    String sample code for java.lang.String definition code for java.lang.String  minorString)
Creates a GSSException object with the specified major code, minor code, and minor code textual explanation. This constructor is to be used when the exception is originating from the underlying mechanism level. It allows the setting of both the GSS code and the mechanism code.

Parameters:
majorCode - the GSS error code for the problem causing this exception to be thrown.
minorCode - the mechanism level error code for the problem causing this exception to be thrown.
minorString - the textual explanation of the mechanism error code.
Method Detail

getMajor sample code for org.ietf.jgss.GSSException.getMajor() definition code for org.ietf.jgss.GSSException.getMajor()

public int getMajor()
Returns the GSS-API level major error code for the problem causing this exception to be thrown. Major error codes are defined at the mechanism independent GSS-API level in this class. Mechanism specific error codes that might provide more information aer set as the minor error code.

Returns:
int the GSS-API level major error code causing this exception
See Also:
getMajorString() sample code for org.ietf.jgss.GSSException.getMajorString() definition code for org.ietf.jgss.GSSException.getMajorString() , getMinor() sample code for org.ietf.jgss.GSSException.getMinor() definition code for org.ietf.jgss.GSSException.getMinor() , getMinorString() sample code for org.ietf.jgss.GSSException.getMinorString() definition code for org.ietf.jgss.GSSException.getMinorString()

getMinor sample code for org.ietf.jgss.GSSException.getMinor() definition code for org.ietf.jgss.GSSException.getMinor()

public int getMinor()
Returns the mechanism level error code for the problem causing this exception to be thrown. The minor code is set by the underlying mechanism.

Returns:
int the mechanism error code; 0 indicates that it has not been set.
See Also:
getMinorString() sample code for org.ietf.jgss.GSSException.getMinorString() definition code for org.ietf.jgss.GSSException.getMinorString() , setMinor(int, java.lang.String) sample code for org.ietf.jgss.GSSException.setMinor(int, java.lang.String) definition code for org.ietf.jgss.GSSException.setMinor(int, java.lang.String)

getMajorString sample code for org.ietf.jgss.GSSException.getMajorString() definition code for org.ietf.jgss.GSSException.getMajorString()

public String sample code for java.lang.String definition code for java.lang.String  getMajorString()
Returns a string explaining the GSS-API level major error code in this exception.

Returns:
String explanation string for the major error code
See Also:
getMajor() sample code for org.ietf.jgss.GSSException.getMajor() definition code for org.ietf.jgss.GSSException.getMajor() , toString() sample code for org.ietf.jgss.GSSException.toString() definition code for org.ietf.jgss.GSSException.toString()

getMinorString sample code for org.ietf.jgss.GSSException.getMinorString() definition code for org.ietf.jgss.GSSException.getMinorString()

public String sample code for java.lang.String definition code for java.lang.String  getMinorString()
Returns a string explaining the mechanism specific error code. If the minor status code is 0, then no mechanism level error details will be available.

Returns:
String a textual explanation of mechanism error code
See Also:
getMinor() sample code for org.ietf.jgss.GSSException.getMinor() definition code for org.ietf.jgss.GSSException.getMinor() , getMajorString() sample code for org.ietf.jgss.GSSException.getMajorString() definition code for org.ietf.jgss.GSSException.getMajorString() , toString() sample code for org.ietf.jgss.GSSException.toString() definition code for org.ietf.jgss.GSSException.toString()

setMinor sample code for org.ietf.jgss.GSSException.setMinor(int, java.lang.String) definition code for org.ietf.jgss.GSSException.setMinor(int, java.lang.String)

public void setMinor(int minorCode,
                     String sample code for java.lang.String definition code for java.lang.String  message)
Used by the exception thrower to set the mechanism level minor error code and its string explanation. This is used by mechanism providers to indicate error details.

Parameters:
minorCode - the mechanism specific error code
message - textual explanation of the mechanism error code
See Also:
getMinor() sample code for org.ietf.jgss.GSSException.getMinor() definition code for org.ietf.jgss.GSSException.getMinor()

toString sample code for org.ietf.jgss.GSSException.toString() definition code for org.ietf.jgss.GSSException.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a textual representation of both the major and the minor status codes.

Overrides:
toString sample code for java.lang.Throwable.toString() definition code for java.lang.Throwable.toString() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
a String with the error descriptions

getMessage sample code for org.ietf.jgss.GSSException.getMessage() definition code for org.ietf.jgss.GSSException.getMessage()

public String sample code for java.lang.String definition code for java.lang.String  getMessage()
Returns a textual representation of both the major and the minor status codes.

Overrides:
getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
a String with the error descriptions