|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.mwe.internal.core.debug.processing.handlers.CommandRuntimeHandler
public class CommandRuntimeHandler
This class handles the communication of debug commands on the runtime side.
It listens in an extra thread for commands and sets state values accordingly.
The DebugMonitor
uses this class to react according to the
process state settings when it needs to.
The ICommandListener
and IProcessHandler
methods
are the active ones that communicate with the debug server.
The IEventHandler
methods react only internally on events.
Field Summary | |
---|---|
static int |
RESUME
|
static int |
STEP_INTO
|
static int |
STEP_OVER
|
static int |
STEP_RETURN
|
static int |
SUSPEND
|
static int |
TERMINATE
|
Fields inherited from interface org.eclipse.emf.mwe.internal.core.debug.processing.ProcessHandler |
---|
INTERRUPT, POP, PUSH, SHALL_HANDLE |
Fields inherited from interface org.eclipse.emf.mwe.core.debug.processing.EventHandler |
---|
END_FRAME, NORMAL_FRAME |
Constructor Summary | |
---|---|
CommandRuntimeHandler()
|
Method Summary | |
---|---|
void |
init(DebugMonitor monitor,
Connection connection)
initiate the instantiated handler. |
boolean |
isLastCall()
the CommandRuntimeHandler shall have the last call |
void |
listenCommand()
listen for the next regular process command. |
void |
postTask(java.lang.Object context)
decrement the iteration level |
void |
preTask(java.lang.Object element,
java.lang.Object context,
int state)
increment the iteration level |
void |
resumed()
no contribution here |
void |
run()
|
boolean |
shallHandle(boolean lastState,
java.lang.Object element,
int flag)
ask the suitable element adapter if the element shall be handled. |
boolean |
shallInterrupt(boolean lastState)
return true in case of a user's terminate event or if the socket connection is no longer open |
boolean |
shallSuspend(boolean lastState,
java.lang.Object element,
int flag)
return true in case of a user's suspend request or dependend on the current iteration level. |
void |
started()
no contribution here |
void |
startListener()
start the listening process in an extra thread, if required |
void |
suspended()
reset a potential forceSuspend request |
void |
terminated()
no contribution here |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STEP_INTO
public static final int STEP_OVER
public static final int STEP_RETURN
public static final int RESUME
public static final int SUSPEND
public static final int TERMINATE
Constructor Detail |
---|
public CommandRuntimeHandler()
Method Detail |
---|
public void init(DebugMonitor monitor, Connection connection)
RuntimeHandler
DebugMonitor
and Connection
instances that may be needed for the handler to do it's workDebugMonitor
dependent on the type of handler.
init
in interface RuntimeHandler
monitor
- the DebugMonitorconnection
- the connection to the debugger frameworkRuntimeHandler.init(org.eclipse.emf.mwe.internal.core.debug.processing.DebugMonitor,
org.eclipse.emf.mwe.internal.core.debug.communication.Connection)
public void startListener()
RuntimeHandler
startListener
in interface RuntimeHandler
RuntimeHandler.startListener()
public void run()
run
in interface java.lang.Runnable
Runnable.run()
public boolean isLastCall()
isLastCall
in interface ProcessHandler
ProcessHandler.isLastCall()
public boolean shallHandle(boolean lastState, java.lang.Object element, int flag)
shallHandle
in interface ProcessHandler
lastState
- the consolidated decisions of previously asked listenerselement
- the element that is questionedflag
- one of the values IProcessHandler.PUSH
or IProcessHandler.POP
ProcessHandler.shallHandle(boolean,
java.lang.Object, int)
public boolean shallSuspend(boolean lastState, java.lang.Object element, int flag)
shallSuspend
in interface ProcessHandler
lastState
- the consolidated decisions of previously asked listenerselement
- the element that is questionedflag
- one of the values IEventHandler.NORMAL_FRAME
or
IEventHandler.END_FRAME
ProcessHandler.shallSuspend(boolean,
java.lang.Object, int)
public boolean shallInterrupt(boolean lastState)
shallInterrupt
in interface ProcessHandler
lastState
- the consolidated decisions of previously asked listeners
ProcessHandler.shallInterrupt(boolean)
public void started()
started
in interface EventHandler
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#started()
public void preTask(java.lang.Object element, java.lang.Object context, int state)
preTask
in interface EventHandler
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#preTask(java.lang.Object,
int)
public void postTask(java.lang.Object context)
postTask
in interface EventHandler
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#preTask(java.lang.Object,
int)
public void suspended()
suspended
in interface EventHandler
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#suspended()
public void resumed()
resumed
in interface EventHandler
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#started()
public void terminated()
terminated
in interface EventHandler
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#started()
public void listenCommand()
CommandListener
listenCommand
in interface CommandListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |