|
All LDAP Classes Internal LDAP Classes |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.ldap.client.Debug
public abstract class Debug
The Debug
class contains several useful debugging class (static)
methods. It cannot be instantiated.
Some methods give useful information, such as amount of memory used,
enabling instruction tracing, displaying object hierarchy, and dumping
the contents of a raw byte
buffer.
Another type of debug supports two kinds of methods; those that inform
whether a debug option is set or not; and those that output the specified
string to the debugOut
stream when the associated debug value
is set.
The Debug class checks in the object returned by System.getProperties
for the name ldap.debug which has the following valid values:
VMtraceInstructions
- Enables instruction trace
VMtraceMethodCalls
- Enables method call trace
trace
- Displays a string if the named property is set
dumpBuffer
- Displays raw buffer dumps
dumpObject
- Displays information about an object.
The following property values can limit the information displayed. If
dumpObject is selected, all those listed below are also selected
dumpObjectHierarchy
- Displays object hierarchy
dumpObjectConstructors
- Displays object constructors
dumpObjectFields
- Displays object fields
dumpObjectMethods
- Displays object methods
If multiple values are desired, they are separated by semicolon's, i.e.
java -Dldap.debug=serverprogress;echodebug TServer -tree junk
The ldap_debug
variable allows debug code to be excluded
from a compile by codeing something like the following:
if( Debug.LDAP_DEBUG) trace(trace.referrals, "Entering referral code");
Field Summary | |
---|---|
static java.lang.String |
all
The string value used to enable all debug tracing. |
static java.lang.String |
apiRequests
The string value used to enable debug tracing of API Requests |
static java.lang.String |
asn1
The string value used to enable debug tracing of ASN1 encode/decode |
static java.lang.String |
bindSemaphore
The string value used to enable debug tracing of the bind semaphore |
static java.lang.String |
buffer
The string value used to enable debug display of buffer dumps. |
static java.lang.String |
connections
The string value used to enable debug tracing of LDAP Connections. |
static java.lang.String |
controls
The string value used to enable debug tracing of Controls |
private static java.io.PrintStream |
debugOut
|
static java.lang.String |
decoding
The string value used to enable debug tracing of Ber Decoding. |
private static boolean |
dumpBuffer
|
private static boolean |
dumpObject
|
private static boolean |
dumpObjectConstructors
|
private static boolean |
dumpObjectFields
|
private static boolean |
dumpObjectHierarchy
|
private static boolean |
dumpObjectMethods
|
static java.lang.String |
encoding
The string value used to enable debug tracing of BER Encoding. |
static java.lang.String |
EventsCalls
The string value used to enable display of Events Calls. |
(package private) static java.text.SimpleDateFormat |
formatter
|
static boolean |
LDAP_DEBUG
The value for this variable is set during compile time TRUE = Debug build, FALSE = Release build |
static java.lang.String |
messages
The string value used to enable debug tracing of message processing |
static java.lang.String |
objectConstructors
The string value used to enable debug display of object constructor dumps. |
static java.lang.String |
objectFields
The string value used to enable debug display of object field dumps. |
static java.lang.String |
objectHierarchy
The string value used to enable debug display of object hierarchy dumps. |
static java.lang.String |
objectMethods
The string value used to enable debug display of object methods dumps. |
static java.lang.String |
objects
The string value used to enable debug display of object dumps. |
private static java.util.Properties |
objprop
|
static java.lang.String |
rawInput
The string value used to enable debug tracing of raw input. |
static java.lang.String |
rawOutput
The string value used to enable debug tracing of Raw Output. |
static java.lang.String |
referrals
The string value used to enable debug tracing of referral processing. |
private static java.lang.Runtime |
run
|
static java.lang.String |
saslBind
The string value used to enable debug tracing of Sasl Bind processing. |
static java.lang.String |
TLS
The string value used to enable display of TLS calls and info for startTLS and stopTLS. |
private static boolean |
traceAPIRequests
|
private static boolean |
traceASN1
|
private static boolean |
traceBindSemaphore
|
private static boolean |
traceConnections
|
private static boolean |
traceControls
|
private static boolean |
traceDecoding
|
private static boolean |
traceEncoding
|
private static boolean |
traceevents
|
static java.lang.String |
traceInstructions
The string value used to enable VM instruction trace. |
private static boolean |
traceMessages
|
static java.lang.String |
traceMethodCalls
The string value used to enable display VM method calls. |
private static boolean |
traceRawInput
|
private static boolean |
traceRawOutput
|
private static boolean |
traceReferrals
|
private static boolean |
traceSaslBind
|
private static boolean |
traceTLS
|
private static boolean |
traceUrlParse
|
static java.lang.String |
urlParse
The string value used to enable debug tracing of URL parsing. |
private static boolean |
VMtraceInstructions
|
private static boolean |
VMtraceMethodCalls
|
Constructor Summary | |
---|---|
private |
Debug()
|
Method Summary | |
---|---|
static boolean |
dumpBuffer()
Returns true if dumpBuffer is enabled |
static void |
dumpBuffer(java.lang.String msg,
byte[] inBuffer,
int fileOffset,
int length)
Dumps a the specified portion of the byte array, as hexidecmal bytes and also intrepreted as ASCII. |
private static void |
dumpClasses(java.lang.Class obj,
int level)
|
private static void |
dumpInterfaces(java.lang.Class obj,
int level)
|
private static void |
dumpLine(byte[] inBuffer,
int offset,
int length,
int addrOffset)
|
static boolean |
dumpObject()
Returns true if dumpObect is enabled |
static void |
dumpObject(java.lang.Object obj)
Displays information about an object. |
static boolean |
dumpObjectConstructors()
Returns true if dumpObectConstructors is enabled |
static boolean |
dumpObjectFields()
Returns true if dumpObjectFields is enabled |
static boolean |
dumpObjectHierarchy()
Returns true if dumpObjectHierarchy is enabled |
static boolean |
dumpObjectMethods()
Returns true if dumpObectMethods is enabled |
static long |
freeMemory()
Returns the free memory available in the virtual machine |
static void |
setDumpBuffer(boolean val)
Turns on or off debug dumpBuffer |
static void |
setDumpObject(boolean val)
Turns on or off debug dumpObject |
static void |
setDumpObjectConstructors(boolean val)
Turns on or off debug dumpObjectConstructors |
static void |
setDumpObjectFields(boolean val)
Turns on or off debug dumpObjectFields |
static void |
setDumpObjectHierarchy(boolean val)
Turns on or off debug dumpObjectHierarchy |
static void |
setDumpObjectMethods(boolean val)
Turns on or off debug dumpObjectMethods |
static void |
setTrace(java.lang.String type,
boolean val)
Turns on or off debug printing |
static void |
setTraceStream(java.io.PrintStream stream)
Sets the output PrintStream used for debug output |
private static boolean |
toggle(boolean b)
|
static long |
totalMemory()
Returns the total memory available in the virtual machine |
static boolean |
trace(java.lang.String type)
Returns true if trace is enabled |
static void |
trace(java.lang.String type,
java.lang.String str)
Displays the specified String str parameter to the
print stream if trace is enabled. |
static boolean |
VMtraceInstructions()
Returns true if VMtraceInstructions is enabled |
static void |
VMtraceInstructions(boolean onOff)
Displays trace of each instruction executed in the virtual machine |
static boolean |
VMtraceMethodCalls()
Returns true if VMtraceMethodCalls is enabled |
static void |
VMtraceMethodCalls(boolean onOff)
Displays trace of each methods called |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static java.text.SimpleDateFormat formatter
public static final boolean LDAP_DEBUG
public static final java.lang.String all
public static final java.lang.String rawInput
public static final java.lang.String rawOutput
public static final java.lang.String referrals
public static final java.lang.String messages
public static final java.lang.String apiRequests
public static final java.lang.String bindSemaphore
public static final java.lang.String controls
public static final java.lang.String asn1
public static final java.lang.String encoding
public static final java.lang.String decoding
public static final java.lang.String connections
public static final java.lang.String saslBind
public static final java.lang.String TLS
public static final java.lang.String urlParse
public static final java.lang.String buffer
public static final java.lang.String objects
public static final java.lang.String objectHierarchy
public static final java.lang.String objectConstructors
public static final java.lang.String objectFields
public static final java.lang.String objectMethods
public static final java.lang.String traceInstructions
public static final java.lang.String traceMethodCalls
public static final java.lang.String EventsCalls
private static java.io.PrintStream debugOut
private static boolean dumpBuffer
private static boolean dumpObject
private static boolean dumpObjectHierarchy
private static boolean dumpObjectConstructors
private static boolean dumpObjectFields
private static boolean dumpObjectMethods
private static boolean VMtraceInstructions
private static boolean VMtraceMethodCalls
private static boolean traceControls
private static boolean traceRawInput
private static boolean traceRawOutput
private static boolean traceASN1
private static boolean traceEncoding
private static boolean traceDecoding
private static boolean traceReferrals
private static boolean traceMessages
private static boolean traceBindSemaphore
private static boolean traceAPIRequests
private static boolean traceUrlParse
private static boolean traceConnections
private static boolean traceTLS
private static boolean traceSaslBind
private static boolean traceevents
private static java.util.Properties objprop
private static java.lang.Runtime run
Constructor Detail |
---|
private Debug()
Method Detail |
---|
private static final boolean toggle(boolean b)
public static final boolean trace(java.lang.String type)
true
if trace
is enabled
type
- The String value of the trace type to check.public static final void setTraceStream(java.io.PrintStream stream)
stream
- The PrintStream used for debug outputpublic static final void setTrace(java.lang.String type, boolean val)
type
- The String value of the trace type to enable or disable.val
- The boolean value to enable or disable trace
.public static final void trace(java.lang.String type, java.lang.String str)
String str
parameter to the
print stream if trace
is enabled.
type
- The String value of the trace type to print.str
- A string to display.setTraceStream(PrintStream)
public static final boolean VMtraceInstructions()
true
if VMtraceInstructions
is enabled
public static final void VMtraceInstructions(boolean onOff)
onOff
- A boolean that when set to true enables instruction
tracing and when false disables instruction tracing.public static final boolean VMtraceMethodCalls()
true
if VMtraceMethodCalls
is enabled
public static void VMtraceMethodCalls(boolean onOff)
onOff
- A boolean that when set to true enables method call
tracing and when false disables instruction tracing.public static final long totalMemory()
public static final long freeMemory()
public static final boolean dumpObject()
true
if dumpObect
is enabled
public static final void setDumpObject(boolean val)
val
- The boolean value to enable or disable dumpObject
.public static final boolean dumpObjectHierarchy()
true
if dumpObjectHierarchy
is enabled
public static final void setDumpObjectHierarchy(boolean val)
val
- The boolean value to enable or disable dumpObjectHierarchy
.public static final boolean dumpObjectConstructors()
true
if dumpObectConstructors
is enabled
public static final void setDumpObjectConstructors(boolean val)
val
- The boolean value to enable or disable dumpObjectConstructors
.public static final boolean dumpObjectFields()
true
if dumpObjectFields
is enabled
public static final void setDumpObjectFields(boolean val)
val
- The boolean value to enable or disable dumpObjectFields
.public static final boolean dumpObjectMethods()
true
if dumpObectMethods
is enabled
public static final void setDumpObjectMethods(boolean val)
val
- The boolean value to enable or disable dumpObjectMethods
.public static final void dumpObject(java.lang.Object obj)
dumpObject
- Displays all information about an object.
dumpObjectHierarchy
- Displays object hierarchy
dumpObjectConstructors
- Displays object constructors
dumpObjectFields
- Displays object fields
dumpObjectMethods
- Displays object methods
Multiple environment values are separated by semicolon's, i.e.
java -Dldap.debug=serverprogress;echodebug TServer -tree junk
or
java -Dldap.debug=TraceAll TServer -tree junk
obj
- The object to dumpprivate static final void dumpInterfaces(java.lang.Class obj, int level)
private static final void dumpClasses(java.lang.Class obj, int level)
public static final boolean dumpBuffer()
true
if dumpBuffer
is enabled
public static final void setDumpBuffer(boolean val)
val
- The boolean value to enable or disable dumpBuffer
.public static final void dumpBuffer(java.lang.String msg, byte[] inBuffer, int fileOffset, int length)
msg
- The title to display before the buffer dumpinBuffer
- The byte arrary buffer to dumpfileOffset
- The address displayed is offset by this amountlength
- The number of bytes to displayprivate static final void dumpLine(byte[] inBuffer, int offset, int length, int addrOffset)
|
All LDAP Classes Internal LDAP Classes |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |