org.eclipse.emf.mwe.internal.core.debug.processing.handlers
Class EventRuntimeHandler

java.lang.Object
  extended by org.eclipse.emf.mwe.internal.core.debug.processing.handlers.EventRuntimeHandler
All Implemented Interfaces:
EventHandler, RuntimeHandler

public class EventRuntimeHandler
extends java.lang.Object
implements RuntimeHandler, EventHandler

This class handles the communication of debug events on the runtime side.
It sends them out (together with addition syntax element information, if required).


Field Summary
static int RESUMED
           
static int STARTED
           
static int SUSPENDED
           
static int TERMINATED
           
 
Fields inherited from interface org.eclipse.emf.mwe.core.debug.processing.EventHandler
END_FRAME, NORMAL_FRAME
 
Constructor Summary
EventRuntimeHandler()
           
 
Method Summary
 void init(DebugMonitor monitor, Connection connection)
          initiate the instantiated handler.
 void postTask(java.lang.Object context)
          Pop the element from the stack, adjust the cleanStackLevel value if required
 void preTask(java.lang.Object element, java.lang.Object context, int state)
          Push the element onto the stack
 void resumed()
          Send RESUMED event to the debug server
 void started()
          Send STARTED event to the debug server
 void startListener()
          no need to listen
 void suspended()
          Send SUSPENDED event to the debug server together with the number of stack elements that are still the same (cleanStackLevel) since the last suspend and all new SyntaxElements.
Wait for a confirmation.
 void terminated()
          Send TERMINATED event to the debug server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARTED

public static final int STARTED
See Also:
Constant Field Values

SUSPENDED

public static final int SUSPENDED
See Also:
Constant Field Values

RESUMED

public static final int RESUMED
See Also:
Constant Field Values

TERMINATED

public static final int TERMINATED
See Also:
Constant Field Values
Constructor Detail

EventRuntimeHandler

public EventRuntimeHandler()
Method Detail

init

public void init(DebugMonitor monitor,
                 Connection connection)
Description copied from interface: RuntimeHandler
initiate the instantiated handler. It gets the DebugMonitor and Connection instances that may be needed for the handler to do it's work
the handler may be registered at the DebugMonitor dependent on the type of handler.

Specified by:
init in interface RuntimeHandler
Parameters:
monitor - the DebugMonitor
connection - the connection to the debugger framework
See Also:
RuntimeHandler.init(org.eclipse.emf.mwe.internal.core.debug.processing.DebugMonitor, org.eclipse.emf.mwe.internal.core.debug.communication.Connection)

startListener

public void startListener()
no need to listen

Specified by:
startListener in interface RuntimeHandler
See Also:
RuntimeHandler.startListener()

started

public void started()
             throws java.io.IOException
Send STARTED event to the debug server

Specified by:
started in interface EventHandler
Throws:
java.io.IOException
See Also:
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#started()

preTask

public void preTask(java.lang.Object element,
                    java.lang.Object context,
                    int state)
Push the element onto the stack

Specified by:
preTask in interface EventHandler
See Also:
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#preTask(java.lang.Object, int)

postTask

public void postTask(java.lang.Object context)
Pop the element from the stack, adjust the cleanStackLevel value if required

Specified by:
postTask in interface EventHandler
See Also:
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#postTask()

suspended

public void suspended()
               throws java.io.IOException
Send SUSPENDED event to the debug server together with the number of stack elements that are still the same (cleanStackLevel) since the last suspend and all new SyntaxElements.
Wait for a confirmation. In the meantime other threads could handle for instance variable requests.

Specified by:
suspended in interface EventHandler
Throws:
java.io.IOException
See Also:
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#suspended()

resumed

public void resumed()
             throws java.io.IOException
Send RESUMED event to the debug server

Specified by:
resumed in interface EventHandler
Throws:
java.io.IOException
See Also:
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#resumed()

terminated

public void terminated()
                throws java.io.IOException
Send TERMINATED event to the debug server

Specified by:
terminated in interface EventHandler
Throws:
java.io.IOException
See Also:
org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#terminated()