- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- org.ietf.jgss.GSSException
 
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class GSSException extends 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 SummaryFields Modifier and Type Field Description static intBAD_BINDINGSChannel bindings mismatch.static intBAD_MECHUnsupported mechanism requested.static intBAD_MICToken had invalid integrity check.static intBAD_NAMEInvalid name provided.static intBAD_NAMETYPEName of unsupported type provided.static intBAD_QOPUnsupported QOP value.static intBAD_STATUSInvalid status code.static intCONTEXT_EXPIREDSecurity context expired.static intCREDENTIALS_EXPIREDExpired credentials.static intDEFECTIVE_CREDENTIALDefective credentials.static intDEFECTIVE_TOKENDefective token.static intDUPLICATE_ELEMENTDuplicate credential element requested.static intDUPLICATE_TOKENThe token was a duplicate of an earlier token.static intFAILUREGeneral failure, unspecified at GSS-API level.static intGAP_TOKENAn expected per-message token was not received.static intNAME_NOT_MNName contains multi-mechanism elements.static intNO_CONTEXTInvalid security context.static intNO_CREDInvalid credentials.static intOLD_TOKENThe token's validity period has expired.static intUNAUTHORIZEDOperation unauthorized.static intUNAVAILABLEOperation unavailable.static intUNSEQ_TOKENA later token has already been processed.
 - 
Constructor SummaryConstructors Constructor Description GSSException(int majorCode)Creates a GSSException object with a specified major code.GSSException(int majorCode, int minorCode, String minorString)Creates a GSSException object with the specified major code, minor code, and minor code textual explanation.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMajor()Returns the GSS-API level major error code for the problem causing this exception to be thrown.StringgetMajorString()Returns a string explaining the GSS-API level major error code in this exception.StringgetMessage()Returns a textual representation of both the major and the minor status codes.intgetMinor()Returns the mechanism level error code for the problem causing this exception to be thrown.StringgetMinorString()Returns a string explaining the mechanism specific error code.voidsetMinor(int minorCode, String message)Used by the exception thrower to set the mechanism level minor error code and its string explanation.StringtoString()Returns a textual representation of both the major and the minor status codes.- 
Methods declared in class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
- 
 
- 
- 
- 
Field Detail- 
BAD_BINDINGSpublic static final int BAD_BINDINGS Channel bindings mismatch.- See Also:
- Constant Field Values
 
 - 
BAD_MECHpublic static final int BAD_MECH Unsupported mechanism requested.- See Also:
- Constant Field Values
 
 - 
BAD_NAMEpublic static final int BAD_NAME Invalid name provided.- See Also:
- Constant Field Values
 
 - 
BAD_NAMETYPEpublic static final int BAD_NAMETYPE Name of unsupported type provided.- See Also:
- Constant Field Values
 
 - 
BAD_STATUSpublic static final int BAD_STATUS Invalid status code.- See Also:
- Constant Field Values
 
 - 
BAD_MICpublic static final int BAD_MIC Token had invalid integrity check.- See Also:
- Constant Field Values
 
 - 
CONTEXT_EXPIREDpublic static final int CONTEXT_EXPIRED Security context expired.- See Also:
- Constant Field Values
 
 - 
CREDENTIALS_EXPIREDpublic static final int CREDENTIALS_EXPIRED Expired credentials.- See Also:
- Constant Field Values
 
 - 
DEFECTIVE_CREDENTIALpublic static final int DEFECTIVE_CREDENTIAL Defective credentials.- See Also:
- Constant Field Values
 
 - 
DEFECTIVE_TOKENpublic static final int DEFECTIVE_TOKEN Defective token.- See Also:
- Constant Field Values
 
 - 
FAILUREpublic static final int FAILURE General failure, unspecified at GSS-API level.- See Also:
- Constant Field Values
 
 - 
NO_CONTEXTpublic static final int NO_CONTEXT Invalid security context.- See Also:
- Constant Field Values
 
 - 
NO_CREDpublic static final int NO_CRED Invalid credentials.- See Also:
- Constant Field Values
 
 - 
BAD_QOPpublic static final int BAD_QOP Unsupported QOP value.- See Also:
- Constant Field Values
 
 - 
UNAUTHORIZEDpublic static final int UNAUTHORIZED Operation unauthorized.- See Also:
- Constant Field Values
 
 - 
UNAVAILABLEpublic static final int UNAVAILABLE Operation unavailable.- See Also:
- Constant Field Values
 
 - 
DUPLICATE_ELEMENTpublic static final int DUPLICATE_ELEMENT Duplicate credential element requested.- See Also:
- Constant Field Values
 
 - 
NAME_NOT_MNpublic static final int NAME_NOT_MN Name contains multi-mechanism elements.- See Also:
- Constant Field Values
 
 - 
DUPLICATE_TOKENpublic 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_TOKENpublic 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_TOKENpublic 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_TOKENpublic 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- 
GSSExceptionpublic 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.
 
 - 
GSSExceptionpublic GSSException(int majorCode, int minorCode, 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- 
getMajorpublic 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 are set as the minor error code.- Returns:
- int the GSS-API level major error code causing this exception
- See Also:
- getMajorString(),- getMinor(),- getMinorString()
 
 - 
getMinorpublic 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(),- setMinor(int, java.lang.String)
 
 - 
getMajorStringpublic 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(),- toString()
 
 - 
getMinorStringpublic 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(),- getMajorString(),- toString()
 
 - 
setMinorpublic void setMinor(int minorCode, 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()
 
 - 
toStringpublic String toString() Returns a textual representation of both the major and the minor status codes.
 - 
getMessagepublic String getMessage() Returns a textual representation of both the major and the minor status codes.- Overrides:
- getMessagein class- Throwable
- Returns:
- a String with the error descriptions
 
 
- 
 
-