cz.cuni.amis.pogamut.sposh.dbg.engine
Class AbstractDebugEngine

Package class diagram package AbstractDebugEngine
java.lang.Object
  extended by cz.cuni.amis.pogamut.sposh.dbg.engine.AbstractDebugEngine
All Implemented Interfaces:
IDebugEngine
Direct Known Subclasses:
YaposhEngine

public abstract class AbstractDebugEngine
extends Object
implements IDebugEngine

Abstract class implementing IDebugEngine that is implementing some common things, like listeners.

Author:
Honza

Constructor Summary
AbstractDebugEngine()
           
 
Method Summary
 boolean addListener(IDebugEngineListener listener)
          Add listener for changes in state of the engine, it is synchronized.
protected  IDebugEngineListener[] getListeners()
          For internal use, get array of listeners that won't be affected by the changes of set of listener
protected  void notifyConnected()
          Notify listeners that engine is connected and can now add breakpoints.
protected  void notifyDisconnected(String message, boolean error)
          Notify listeners that engine has been disconnected from the JVM.
protected  void notifyEvaluationFinished()
          Notify listeners that evaluation phase of engine has been finished
protected  void notifyEvaluationReached()
          Notify listeners that evaluation phase of engine has been reached
protected  void notifyPathReached(cz.cuni.amis.pogamut.sposh.elements.LapPath path)
          Notify listeners that engine is about to fire a path.
protected  void notifyPlanRecieved(String name, cz.cuni.amis.pogamut.sposh.elements.PoshPlan plan)
          Notify all listeners that plan has been recieved
 boolean removeListener(IDebugEngineListener listener)
          Remove listener from set of listeners of this engine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.sposh.dbg.engine.IDebugEngine
addBreakpoint, disconnect, initialize, removeBreakpoint
 

Constructor Detail

AbstractDebugEngine

public AbstractDebugEngine()
Method Detail

addListener

public final boolean addListener(IDebugEngineListener listener)
Add listener for changes in state of the engine, it is synchronized.

Specified by:
addListener in interface IDebugEngine
Parameters:
listener - new listener to add, not null
Returns:
was listener already among listeners?

removeListener

public final boolean removeListener(IDebugEngineListener listener)
Remove listener from set of listeners of this engine.

Specified by:
removeListener in interface IDebugEngine
Parameters:
listener - listener to remove
Returns:
was passed listener among listeners of this engine?

getListeners

protected final IDebugEngineListener[] getListeners()
For internal use, get array of listeners that won't be affected by the changes of set of listener

Returns:
array of listeners of this engine

notifyConnected

protected final void notifyConnected()
Notify listeners that engine is connected and can now add breakpoints.


notifyPlanRecieved

protected final void notifyPlanRecieved(String name,
                                        cz.cuni.amis.pogamut.sposh.elements.PoshPlan plan)
Notify all listeners that plan has been recieved

Parameters:
name - name of the engine that is running this plan
plan - String representation of plan (e.g. POSH or Shade)

notifyEvaluationReached

protected final void notifyEvaluationReached()
Notify listeners that evaluation phase of engine has been reached


notifyEvaluationFinished

protected final void notifyEvaluationFinished()
Notify listeners that evaluation phase of engine has been finished


notifyPathReached

protected final void notifyPathReached(cz.cuni.amis.pogamut.sposh.elements.LapPath path)
Notify listeners that engine is about to fire a path.

Parameters:
path - Path that is about to be fired

notifyDisconnected

protected final void notifyDisconnected(String message,
                                        boolean error)
Notify listeners that engine has been disconnected from the JVM.

Parameters:
message - Optional message to display the user.
error - Was debugger disconnected because of an error or was it OK.


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.