com.ibm.security.jgss
Class Debug
- java.lang.Object
com.ibm.security.jgss.Debug
- public class Debug
- extends java.lang.Object
All debug information is output to the Java System.out, normally the standard output of the process.
Debugging is turned on or off by setting the Java property
com.ibm.security.jgss.debug
. Setting the property to
all
turns on debugging for all categories, and setting it to
off
turns off debugging completely. The property may be set
to one or more of the following to turn on debugging for
particular categories.
Multiple categories should be comma-separated.
application|app
: application-level, the default if the property is not set at all or is set to nothingcontext|ctx
: context operationscredential|cred|creds
: credential operationsmarshal|marsh
: marshaling (of tokens)mic
: MIC operationsprovider|prov
: mechanism provider operationsqop
: Qop operationsunmarshal|unmarsh
: unmarshaling (of tokens)wrap
: wrap and unwrap operations
Debugging can also be controlled programatically using the set
and unset
methods.
Author:
Thomas Owusu.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
OPTS_ALL
Turns on debugging for all categories.
|
|
OPTS_CAT_APPLICATION
Turns on debugging for applications.
|
|
OPTS_CAT_CONTEXT
Turns on debugging for context establishment and
other context operations.
|
|
OPTS_CAT_CREDENTIAL
Turns on debugging for credentials operations.
|
|
OPTS_CAT_MARSHAL
Turns on debugging for marshalling operations.
|
|
OPTS_CAT_MIC
Turns on debugging for MIC operations.
|
|
OPTS_CAT_PROVIDER
Turns on debugging for mechanism provider operations.
|
|
OPTS_CAT_QOP
Turns on debugging for Qop operations.
|
|
OPTS_CAT_UNMARSHAL
Turns on debugging for unmarshalling operations.
|
|
OPTS_CAT_WRAP
Turns on debugging for wrap and unwrap operations.
|
|
OPTS_OFF
Turns off debugging completely.
|
Constructor Summary
Constructor and Description |
---|
Debug()
The default constructor.
|
Debug(java.util.BitSet options)
Creates a Debug instance using the supplied options.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
on()
Tests if debugging is on for any category.
|
|
on(int category)
Tests if debugging is on for the specified category.
|
|
out(int category,byte[] msg)
Displays the specified message if the specified category is on.
|
|
out(int category,java.lang.String msg)
Displays the specified message if the specified category is on.
|
|
set(int option)
Turns on debugging for the specified category.
|
|
toString()
Returns a sting representation of this Debug object instance.
|
|
unset(int option)
Turns off debugging for the specified category.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail
OPTS_ALL
- public static final int OPTS_ALL
Turns on debugging for all categories.
See Also:
OPTS_OFF
- public static final int OPTS_OFF
Turns off debugging completely.
See Also:
OPTS_CAT_APPLICATION
- public static final int OPTS_CAT_APPLICATION
Turns on debugging for applications.
See Also:
OPTS_CAT_CONTEXT
- public static final int OPTS_CAT_CONTEXT
Turns on debugging for context establishment and
other context operations.
See Also:
OPTS_CAT_CREDENTIAL
- public static final int OPTS_CAT_CREDENTIAL
Turns on debugging for credentials operations.
See Also:
OPTS_CAT_MARSHAL
- public static final int OPTS_CAT_MARSHAL
Turns on debugging for marshalling operations.
See Also:
OPTS_CAT_MIC
- public static final int OPTS_CAT_MIC
Turns on debugging for MIC operations.
See Also:
OPTS_CAT_PROVIDER
- public static final int OPTS_CAT_PROVIDER
Turns on debugging for mechanism provider operations.
See Also:
OPTS_CAT_WRAP
- public static final int OPTS_CAT_WRAP
Turns on debugging for wrap and unwrap operations.
See Also:
OPTS_CAT_UNMARSHAL
- public static final int OPTS_CAT_UNMARSHAL
Turns on debugging for unmarshalling operations.
See Also:
OPTS_CAT_QOP
- public static final int OPTS_CAT_QOP
Turns on debugging for Qop operations.
See Also:
Constructor Detail
Debug
- public Debug()
The default constructor.
It sets debug options from the
com.ibm.security.jgss.debug
property.
Debug
- public Debug(java.util.BitSet options)
Creates a Debug instance using the supplied options.
It is equiavlent to the
Debug()
contructor if
the supplied options
is null.
Method Detail
out
- public void out(int category,
- java.lang.String msg)
Displays the specified message if the specified category is on.
The message is displayed as a string as-is.
out
- public void out(int category,
- byte[] msg)
Displays the specified message if the specified category is on.
The message is displayed in classic hex-dump format.
on
- public boolean on()
Tests if debugging is on for any category.
on
- public boolean on(int category)
Tests if debugging is on for the specified category.
set
- public void set(int option)
Turns on debugging for the specified category.
unset
- public void unset(int option)
Turns off debugging for the specified category.
Unsetting OPTS_ALL will turn off debugging.
toString
- public java.lang.String toString( )
Returns a sting representation of this Debug object instance.
The string includes the debug categories that are on.
Overrides:
toString
in class java.lang.Object