NetCharts Pro

netcharts.util
Class NFDebug

java.lang.Object
  extended by netcharts.util.NFDebug

public class NFDebug
extends java.lang.Object

This class is used to print out debug messages, based on the type of the message and the types currently enabled. Note: All methods and variables are STATIC to make it easier to print debug messages from anywhere.


Field Summary
static long ACTION
          ACTION
static long AGENT
          AGENT
static long ALL
          ALL
static long AXIS
          AXIS
static long BEANS
          BEANS
static long CACHE
          CACHE
static long DWELL
          DWELL
static long FILE
          FILE
static long GRAPH
          GRAPH
static long HTTP
          HTTP
static long IMAGE
          IMAGE
static long JDBC
          JDBC
static long LEGEND
          LEGEND
static long LICENSE
          LICENSE
static long NOTES
          NOTES
static long PARAM
          PARAM
static java.io.PrintStream printStream
           
static long REMOTE
          REMOTE
static long SECURITY
          SECURITY
static long SERVER
          SERVER
static long SYMBOL
          SYMBOL
static long THREAD
          THREAD
static long WINDOW
          WINDOW
 
Constructor Summary
NFDebug()
           
 
Method Summary
static void addObserver(NFDebugObserver observer)
          Add the given observer
static void clear(long type)
          Disable the given type(s) for subsequent output.
static void clear(java.lang.String list)
          Clear the given options for subsequent output as defined in the comma separated list of option names.
static void clear(java.util.Vector v)
          Clear all of the types defined in the given vector.
static boolean enabled(long type)
          Returns true if one or more of the types specified by the OR'd type parameter are currently set.
static void exception(java.lang.Exception e)
          Print the exception to the default printStream and notify observers.
static void exception(java.io.PrintStream ps, java.lang.String summary, java.lang.Exception e)
          Print the exception to the given printStream and notify observers.
static void exception(java.lang.String summary, java.lang.Exception e)
          Print the exception to the default printStream and notify observers.
static java.util.Hashtable getOptions()
          Returns a static hashtable containing the String names of all debug options as the key, and the numeric id as the value.
static void information(java.lang.Object information)
          Print the exception to the default printStream and notify observers.
static void information(java.io.PrintStream ps, java.lang.Object information)
          Print the exception to the given printStream and notify observers.
static void memCheck(java.lang.String tag, boolean runGC)
           
static void print(long type, java.lang.String msg)
          Print the message on the current printStream, if the given type(s) is set.
static void print(java.io.PrintStream ps, java.lang.String str)
          Print the message on the given printStream.
static void print(java.lang.String msg)
          Print the message on the current printStream, without checking for type settings.
static void removeObserver(NFDebugObserver observer)
          Remove the given observer
static void set(long type)
          Enable the given type(s) for subsequent output.
static void set(java.lang.String list)
          Enable the given options for subsequent output as defined in the comma separated list of option names.
static void set(java.util.Vector v)
          Enable all of the types defined in the given vector.
static void timerReset()
           
static void timerSplit(java.lang.String str)
           
static void warning(java.lang.Object warning)
          Print the exception to the default printStream and notify observers.
static void warning(java.io.PrintStream ps, java.lang.Object warning)
          Print the exception to the given printStream and notify observers.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final long ALL
ALL

See Also:
Constant Field Values

LICENSE

public static final long LICENSE
LICENSE

See Also:
Constant Field Values

PARAM

public static final long PARAM
PARAM

See Also:
Constant Field Values

SERVER

public static final long SERVER
SERVER

See Also:
Constant Field Values

JDBC

public static final long JDBC
JDBC

See Also:
Constant Field Values

DWELL

public static final long DWELL
DWELL

See Also:
Constant Field Values

SYMBOL

public static final long SYMBOL
SYMBOL

See Also:
Constant Field Values

FILE

public static final long FILE
FILE

See Also:
Constant Field Values

BEANS

public static final long BEANS
BEANS

See Also:
Constant Field Values

AXIS

public static final long AXIS
AXIS

See Also:
Constant Field Values

GRAPH

public static final long GRAPH
GRAPH

See Also:
Constant Field Values

LEGEND

public static final long LEGEND
LEGEND

See Also:
Constant Field Values

WINDOW

public static final long WINDOW
WINDOW

See Also:
Constant Field Values

ACTION

public static final long ACTION
ACTION

See Also:
Constant Field Values

NOTES

public static final long NOTES
NOTES

See Also:
Constant Field Values

THREAD

public static final long THREAD
THREAD

See Also:
Constant Field Values

CACHE

public static final long CACHE
CACHE

See Also:
Constant Field Values

IMAGE

public static final long IMAGE
IMAGE

See Also:
Constant Field Values

AGENT

public static final long AGENT
AGENT

See Also:
Constant Field Values

HTTP

public static final long HTTP
HTTP

See Also:
Constant Field Values

SECURITY

public static final long SECURITY
SECURITY

See Also:
Constant Field Values

REMOTE

public static final long REMOTE
REMOTE

See Also:
Constant Field Values

printStream

public static java.io.PrintStream printStream
Constructor Detail

NFDebug

public NFDebug()
Method Detail

getOptions

public static java.util.Hashtable getOptions()
Returns a static hashtable containing the String names of all debug options as the key, and the numeric id as the value.

Returns:
The options.

set

public static void set(long type)
Enable the given type(s) for subsequent output. The type may be composed of OR'd type values to set multiple types at one time.

Parameters:
type - The debug option to set.

set

public static void set(java.lang.String list)
Enable the given options for subsequent output as defined in the comma separated list of option names.

Parameters:
list - A list of debug options.

set

public static void set(java.util.Vector v)
Enable all of the types defined in the given vector. The vector should contain Number objects, which will be converted to a long value to determine the bit setting. This method is generally used in conjunction with the defineDebug() method.

Parameters:
v - The list of debug options to set.

clear

public static void clear(long type)
Disable the given type(s) for subsequent output. The type may be composed of OR'd type values to clear multiple types.

Parameters:
type - The debug option to unset.

clear

public static void clear(java.lang.String list)
Clear the given options for subsequent output as defined in the comma separated list of option names.

Parameters:
list - A list of debug options.

clear

public static void clear(java.util.Vector v)
Clear all of the types defined in the given vector. The vector should contain Number objects, which will be converted to a long value to determine the bit setting.

Parameters:
v - The debug options to unset.

enabled

public static boolean enabled(long type)
Returns true if one or more of the types specified by the OR'd type parameter are currently set.

Parameters:
type - The debug option to check.

print

public static void print(java.lang.String msg)
Print the message on the current printStream, without checking for type settings.

Parameters:
msg - The message to print.

print

public static void print(long type,
                         java.lang.String msg)
Print the message on the current printStream, if the given type(s) is set.

Parameters:
type - The option.
msg - The message to print.

print

public static void print(java.io.PrintStream ps,
                         java.lang.String str)
Print the message on the given printStream.

Parameters:
ps - The stream.
str - The message to print.

exception

public static void exception(java.lang.Exception e)
Print the exception to the default printStream and notify observers.

Parameters:
e - The exception.

exception

public static void exception(java.lang.String summary,
                             java.lang.Exception e)
Print the exception to the default printStream and notify observers.

Parameters:
summary - Text to summarize the exception.
e - The exception.

exception

public static void exception(java.io.PrintStream ps,
                             java.lang.String summary,
                             java.lang.Exception e)
Print the exception to the given printStream and notify observers.

Parameters:
ps - The stream.
summary - Text to summarize the exception.
e - The exception.

warning

public static void warning(java.lang.Object warning)
Print the exception to the default printStream and notify observers.

Parameters:
warning - The warning. Note that the warning's "toString" method will be called to write to the print stream. This allows custom objects to be passed along to observers

warning

public static void warning(java.io.PrintStream ps,
                           java.lang.Object warning)
Print the exception to the given printStream and notify observers.

Parameters:
ps - The stream.
warning - The warning. Note that the warning's "toString" method will be called to write to the print stream. This allows custom objects to be passed along to observers

information

public static void information(java.lang.Object information)
Print the exception to the default printStream and notify observers.

Parameters:
information - The information. Note that the information's "toString" method will be called to write to the print stream. This allows custom objects to be passed along to observers

information

public static void information(java.io.PrintStream ps,
                               java.lang.Object information)
Print the exception to the given printStream and notify observers.

Parameters:
ps - The stream.
information - The information. Note that the information's "toString" method will be called to write to the print stream. This allows custom objects to be passed along to observers

addObserver

public static void addObserver(NFDebugObserver observer)
Add the given observer

Parameters:
observer - The observer to add.

removeObserver

public static void removeObserver(NFDebugObserver observer)
Remove the given observer

Parameters:
observer - The observer to remove.

timerReset

public static void timerReset()

timerSplit

public static void timerSplit(java.lang.String str)

memCheck

public static void memCheck(java.lang.String tag,
                            boolean runGC)

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 28, 2011