com.ibm.security.jgss

Class Debug

  1. java.lang.Object
  2. extended bycom.ibm.security.jgss.Debug

  1. public class Debug
  2. extends java.lang.Object
Controls the output of debug information. Categorizes debugging into functional areas such as marshalling and unmarshalling of tokens. Individual categories can be turned on or off without affecting other categories. If debugging is not explicitly turned off and no category is turned on, application-level debug is output. That is, application-level debugging is on by default.

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.

Debugging can also be controlled programatically using the set and unset methods.

Author:
Thomas Owusu.

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
OPTS_ALL
Turns on debugging for all categories.
  1. static
  2. int
OPTS_CAT_APPLICATION
Turns on debugging for applications.
  1. static
  2. int
OPTS_CAT_CONTEXT
Turns on debugging for context establishment and other context operations.
  1. static
  2. int
OPTS_CAT_CREDENTIAL
Turns on debugging for credentials operations.
  1. static
  2. int
OPTS_CAT_MARSHAL
Turns on debugging for marshalling operations.
  1. static
  2. int
OPTS_CAT_MIC
Turns on debugging for MIC operations.
  1. static
  2. int
OPTS_CAT_PROVIDER
Turns on debugging for mechanism provider operations.
  1. static
  2. int
OPTS_CAT_QOP
Turns on debugging for Qop operations.
  1. static
  2. int
OPTS_CAT_UNMARSHAL
Turns on debugging for unmarshalling operations.
  1. static
  2. int
OPTS_CAT_WRAP
Turns on debugging for wrap and unwrap operations.
  1. static
  2. int
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
  1. boolean
on()
Tests if debugging is on for any category.
  1. boolean
on(int category)
Tests if debugging is on for the specified category.
  1. void
out(int category,byte[] msg)
Displays the specified message if the specified category is on.
  1. void
out(int category,java.lang.String msg)
Displays the specified message if the specified category is on.
  1. void
set(int option)
Turns on debugging for the specified category.
  1. java.lang.String
toString()
Returns a sting representation of this Debug object instance.
  1. void
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

  1. public static final int OPTS_ALL
Turns on debugging for all categories.
See Also:

OPTS_OFF

  1. public static final int OPTS_OFF
Turns off debugging completely.
See Also:

OPTS_CAT_APPLICATION

  1. public static final int OPTS_CAT_APPLICATION
Turns on debugging for applications.
See Also:

OPTS_CAT_CONTEXT

  1. public static final int OPTS_CAT_CONTEXT
Turns on debugging for context establishment and other context operations.
See Also:

OPTS_CAT_CREDENTIAL

  1. public static final int OPTS_CAT_CREDENTIAL
Turns on debugging for credentials operations.
See Also:

OPTS_CAT_MARSHAL

  1. public static final int OPTS_CAT_MARSHAL
Turns on debugging for marshalling operations.
See Also:

OPTS_CAT_MIC

  1. public static final int OPTS_CAT_MIC
Turns on debugging for MIC operations.
See Also:

OPTS_CAT_PROVIDER

  1. public static final int OPTS_CAT_PROVIDER
Turns on debugging for mechanism provider operations.
See Also:

OPTS_CAT_WRAP

  1. public static final int OPTS_CAT_WRAP
Turns on debugging for wrap and unwrap operations.
See Also:

OPTS_CAT_UNMARSHAL

  1. public static final int OPTS_CAT_UNMARSHAL
Turns on debugging for unmarshalling operations.
See Also:

OPTS_CAT_QOP

  1. public static final int OPTS_CAT_QOP
Turns on debugging for Qop operations.
See Also:

Constructor Detail

Debug

  1. public Debug()
The default constructor. It sets debug options from the com.ibm.security.jgss.debug property.

Debug

  1. 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

  1. public void out(int category,
  2. java.lang.String msg)
Displays the specified message if the specified category is on. The message is displayed as a string as-is.

out

  1. public void out(int category,
  2. byte[] msg)
Displays the specified message if the specified category is on. The message is displayed in classic hex-dump format.

on

  1. public boolean on()
Tests if debugging is on for any category.

on

  1. public boolean on(int category)
Tests if debugging is on for the specified category.

set

  1. public void set(int option)
Turns on debugging for the specified category.

unset

  1. public void unset(int option)
Turns off debugging for the specified category. Unsetting OPTS_ALL will turn off debugging.

toString

  1. 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