|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--jde.debugger.command.CommandHandler
Abstract class that provides most of the implementation of the
command handlers. A command handler is run by a thread, which picks
commands from a queue and executes them. Commands are placed on the
queue by another thread that calls the handle(jde.debugger.command.DebugCommand)
method,
which must be defined in a subclass to this. To stop the command
handler, one should call the requestStop()
method.
Created: Tue Jan 08 10:48:01 2002
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
CommandHandler()
|
Method Summary | |
void |
addCommandListener(CommandListener listener)
Add an CommandListener. |
void |
fireCommandEvent(java.lang.Integer procID,
java.lang.Integer cmdID,
java.lang.String cmdName,
java.util.List arguments)
Fire an event indicating that a command has been received. |
abstract java.lang.Integer |
getProcID()
|
abstract void |
handle(DebugCommand cmd)
Handle a debug command: normally means performing some kind of consistency check and then adding it to the internal queue, using the queue(DebugCommand) method. |
protected void |
queue(DebugCommand cmd)
Place the command on the internal command queue. |
void |
removeCommandListener(CommandListener listener)
Remove an CommandListener. |
void |
requestStop()
Used by other threads to request the CommandHandler to stop executing. |
void |
run()
The main loop of the thread simply calls the #remove
method, and then the DebugCommand.doCommand() method of
the received command. |
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 |
Constructor Detail |
public CommandHandler()
Method Detail |
public void fireCommandEvent(java.lang.Integer procID, java.lang.Integer cmdID, java.lang.String cmdName, java.util.List arguments) throws JDEException
public void addCommandListener(CommandListener listener)
listener
- The listener to addpublic void removeCommandListener(CommandListener listener)
listener
- The listener to removeprotected final void queue(DebugCommand cmd) throws JDEException
The above comments refer to an old scheme for processing commands. The current implementation does nothing and should be removed.
cmd
- a DebugCommand
valueJDEException
- if an error occurspublic abstract void handle(DebugCommand cmd) throws JDEException
queue(DebugCommand)
method.cmd
- a DebugCommand
valueJDEException
- if an error occurspublic void requestStop()
public abstract java.lang.Integer getProcID()
public void run()
#remove
method, and then the DebugCommand.doCommand()
method of
the received command.run
in class java.lang.Thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |