jde.debugger
Class JDEbug

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--jde.debugger.JDEbug
All Implemented Interfaces:
Protocol, java.lang.Runnable

public class JDEbug
extends java.lang.Thread
implements Protocol

Class of JDEbug debuggers.

This class defines methods for communicating with the JDE. It maintains a list of active applications. It passes application commands to the apps specified by the commands.

See Protocol class for command/response formats and EventHandler for event set formats.

JDEbug responds to every command with either a result or error message.

Since:
0.1
Version:
$Revision: 1.13 $
Author:
Amit Kumar, Paul Kinnucan

Field Summary
static java.lang.Integer debuggerID
          The ID of jdebug.
static JDEbug theDebugger
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface jde.debugger.Protocol
APP_IO, ATTACH_SHMEM, ATTACH_SOCKET, BR, BREAK, CANCEL_TRACE_CLASSES, CANCEL_TRACE_METHODS, CANCEL_TRACE_THREADS, CLEAR, CMD_NOK, CMD_OK, COMMAND_ERROR, COMMAND_RESULT, COMMANDS, CONNECTED_TO_VM, DEBUG, ERROR, EVALUATE, EVENT_BREAKPOINT_HIT, EVENT_CLASS_PREPARE, EVENT_CLASS_UNLOAD, EVENT_EXCEPTION, EVENT_METHOD_ENTRY, EVENT_METHOD_EXIT, EVENT_OTHER, EVENT_STEP_COMPLETED, EVENT_THREAD_DEATH, EVENT_THREAD_START, EVENT_VM_DEATH, EVENT_VM_DISCONNECT, EVENT_VM_START, EVENT_WATCHPOINT_HIT, EVENTS, EVENTSET, EXCEPTION, EXIT, FINISH, FRAMEWORK, GET_ARRAY, GET_LOADED_CLASSES, GET_LOCALS, GET_OBJECT, GET_OBJECT_MONITORS, GET_PATH_INFORMATION, GET_STRING, GET_THREAD, GET_THREADS, GUI, INTERRUPT, INVALID, JDE_BUG, JDE_INIT_DEBUG_SESSION, JDE_PIPE, KILL_THREAD, LAUNCH, LISTEN_SHMEM, LISTEN_SOCKET, MESSAGE, NONE, NOQUOTE, QUIT, QUOTE, REPORT_IDS_IN_USE, RESUME, RUN, SPEC_RESOLVED, STEP, SUSPEND, TRACE_CLASSES, TRACE_EXCEPTIONS, TRACE_METHODS, TRACE_THREADS, WARNING, WATCH
 
Constructor Summary
protected JDEbug()
          Protected constructor, since this is a singleton class.
 
Method Summary
 void init()
           
 void run()
          Runs the debugger thread.
 void shutdown()
          Sets a flag that terminates the main loop (implemented in the run() method).
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debuggerID

public static final java.lang.Integer debuggerID
The ID of jdebug. This is used by jde when issuing commands that are not specific to any particular vm, for instance, 'quit', or the command used to launch new application/vms.
It is the Integer -1.

theDebugger

public static JDEbug theDebugger
Constructor Detail

JDEbug

protected JDEbug()
Protected constructor, since this is a singleton class.
Method Detail

init

public void init()
          throws java.io.IOException

run

public void run()
Runs the debugger thread. This method reads and executes commands from the JDE.
Overrides:
run in class java.lang.Thread

shutdown

public void shutdown()
Sets a flag that terminates the main loop (implemented in the run() method).