SigPath

org.sigpath.model
Class XDebug

java.lang.Object
  extended by org.sigpath.model.XDebug
All Implemented Interfaces:
Serializable

public class XDebug
extends Object
implements Serializable

Encapsulates Real-time debugging information. XDebug provides a simple facility for logging debug messages, and recording debug parameters. Results of XDebug are conditionally displayed at the bottom of the JSP page.

Version:
$Revision: 8312 $
Author:
Ethan Cerami
See Also:
XDebugMessage, XDebugParameter, Serialized Form

Constructor Summary
XDebug()
          Constructor.
 
Method Summary
 void addParameter(int type, String name, boolean value)
          Adds a new boolean Parameter.
 void addParameter(int type, String name, int value)
          Adds a new integer Parameter.
 void addParameter(int type, String name, String value)
          Adds a new String Parameter.
 Vector getDebugMessages()
          Gets all Debug Messages.
 Vector getParameters()
          Gets all Parameters.
 long getTimeElapsed()
          Gets the total time elapsed (in milliseconds.)
 void logMsg(Object caller, String msg)
          Logs a new message.
 void logMsg(Object caller, String msg, String color)
          Logs a new message with the specified color code.
 void logMsg(Object caller, String msg, String color, Throwable throwable)
          Logs a new message with the specified color code and throwable object.
 void logMsg(Object caller, String msg, Throwable throwable)
          Logs a new message with the specified color code.
 void startTimer()
          Starts the internal timer
 void stopTimer()
          Stops the internal timer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XDebug

public XDebug()
Constructor.

Method Detail

logMsg

public void logMsg(Object caller,
                   String msg,
                   String color,
                   Throwable throwable)
Logs a new message with the specified color code and throwable object.

Parameters:
caller - object that is making the log request
msg - message to log
color - color of message, e.g. "RED, "GREEN"
throwable - throwable object

logMsg

public void logMsg(Object caller,
                   String msg,
                   Throwable throwable)
Logs a new message with the specified color code.

Parameters:
caller - object that is making the log request
msg - message to log
throwable - throwable object

logMsg

public void logMsg(Object caller,
                   String msg,
                   String color)
Logs a new message with the specified color code.

Parameters:
caller - object that is making the log request
msg - message to log
color - color of message, e.g. "RED, "GREEN"

logMsg

public void logMsg(Object caller,
                   String msg)
Logs a new message.

Parameters:
caller - object that is making the log request
msg - message to log

addParameter

public void addParameter(int type,
                         String name,
                         String value)
Adds a new String Parameter.

Parameters:
type - parameter type code, e.g. COOKIE_TYPE, ENVIRONMENT_TYPE
name - parameter name
value - parameter String value

addParameter

public void addParameter(int type,
                         String name,
                         int value)
Adds a new integer Parameter.

Parameters:
type - parameter type code, e.g. COOKIE_TYPE, ENVIRONMENT_TYPE
name - parameter name
value - parameter integer value

addParameter

public void addParameter(int type,
                         String name,
                         boolean value)
Adds a new boolean Parameter.

Parameters:
type - parameter type code, e.g. COOKIE_TYPE, ENVIRONMENT_TYPE
name - parameter name
value - parameter boolean value

getDebugMessages

public Vector getDebugMessages()
Gets all Debug Messages.

Returns:
Vector of XDebugMessage objects

getParameters

public Vector getParameters()
Gets all Parameters.

Returns:
Vector of XDebugParameter objects

startTimer

public void startTimer()
Starts the internal timer


stopTimer

public void stopTimer()
Stops the internal timer


getTimeElapsed

public long getTimeElapsed()
Gets the total time elapsed (in milliseconds.)

Returns:
totalTimeElapsed (ms)

SigPath

Copyright © 2002-2005 Institute for Computational Biomedicine, All Rights Reserved.