The Meta-Environment API

toolbus.viewer
Class AbstractViewerAdapter

java.lang.Object
  extended by toolbus.viewer.AbstractViewerAdapter
All Implemented Interfaces:
IPerformanceMonitor, IViewer

public abstract class AbstractViewerAdapter
extends java.lang.Object
implements IViewer, IPerformanceMonitor

This is a convenience class for implementing viewer event listeners.

Author:
Arnold Lankamp

Constructor Summary
AbstractViewerAdapter()
          Default constructor.
 
Method Summary
 void performanceStatsArrived(ToolInstance toolInstance, aterm.ATerm term)
          Fired when the performance statistics that were requested by the debug ToolBus arrived.
 void processBreakPointHit(ProcessInstance processInstance)
          Informs the viewer that a registered breakpoint on a process or process instance was hit.
 void processInstanceStarted(ProcessInstance processInstance)
          Fired when a new process instance is started.
 void processInstanceTerminated(ProcessInstance processInstance)
          Fired when a process instance is terminated.
 void sourceBreakPointHit(StateElement stateElement)
          Informs the viewer that a registered breakpoint on a sourcecode coordinate was hit.
 void stateElementBreakPointHit(StateElement stateElement)
          Informs the viewer that a registered breakpoint on a state element was hit.
 void stepExecuted(ProcessInstance processInstance, StateElement executedStateElement, ProcessInstance[] partners)
          Fired after the successfull completion of a step.
 void toolbusStarting()
          Fired right before the debug ToolBus starts executing the process logic.
 void toolbusTerminating()
          Fired right before then debug ToolBus shuts down.
 void toolConnected(ToolInstance toolInstance)
          Fired when a tool connects.
 void toolConnectionClosed(ToolInstance toolInstance)
          Fired when a connection with a tool is terminated.
 void updateState(int state)
          Informs the viewer about what the debug toolbus is currently doing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractViewerAdapter

public AbstractViewerAdapter()
Default constructor.

Method Detail

processBreakPointHit

public void processBreakPointHit(ProcessInstance processInstance)
Description copied from interface: IViewer
Informs the viewer that a registered breakpoint on a process or process instance was hit. The debug toolbus will not suspend it's execution by itself; the action that will be taken is completely up to the viewer implementation. In case the execution needs to be paused this will need to be done explicitly by calling the doStop method.

Specified by:
processBreakPointHit in interface IViewer
Parameters:
processInstance - The process instance that matches the breakpoint.
See Also:
IViewer.processBreakPointHit(ProcessInstance)

processInstanceStarted

public void processInstanceStarted(ProcessInstance processInstance)
Description copied from interface: IViewer
Fired when a new process instance is started.

Specified by:
processInstanceStarted in interface IViewer
Parameters:
processInstance - The process instance that was started.
See Also:
IViewer.processInstanceStarted(ProcessInstance)

processInstanceTerminated

public void processInstanceTerminated(ProcessInstance processInstance)
Description copied from interface: IViewer
Fired when a process instance is terminated.

Specified by:
processInstanceTerminated in interface IViewer
Parameters:
processInstance - The process instance that was terminated.
See Also:
IViewer.processInstanceTerminated(ProcessInstance)

sourceBreakPointHit

public void sourceBreakPointHit(StateElement stateElement)
Description copied from interface: IViewer
Informs the viewer that a registered breakpoint on a sourcecode coordinate was hit. The debug toolbus will not suspend it's execution by itself; the action that will be taken is completely up to the viewer implementation. In case the execution needs to be paused this will need to be done explicitly by calling the doStop method.

Specified by:
sourceBreakPointHit in interface IViewer
Parameters:
stateElement - The executed state element which's position information corresponded to a breakpoint set on a sourcecode coordinate.
See Also:
IViewer.sourceBreakPointHit(StateElement)

stateElementBreakPointHit

public void stateElementBreakPointHit(StateElement stateElement)
Description copied from interface: IViewer
Informs the viewer that a registered breakpoint on a state element was hit. The debug toolbus will not suspend it's execution by itself; the action that will be taken is completely up to the viewer implementation. In case the execution needs to be paused this will need to be done explicitly by calling the doStop method.

Specified by:
stateElementBreakPointHit in interface IViewer
Parameters:
stateElement - The state element on which the breakpoint was set.
See Also:
IViewer.stateElementBreakPointHit(StateElement)

stepExecuted

public void stepExecuted(ProcessInstance processInstance,
                         StateElement executedStateElement,
                         ProcessInstance[] partners)
Description copied from interface: IViewer
Fired after the successfull completion of a step.

Specified by:
stepExecuted in interface IViewer
Parameters:
processInstance - The process instance in which a state element was executed.
executedStateElement - The state element that was executed.
partners - All the process instances that cooperated during the execution of the state element.
See Also:
IViewer.stepExecuted(ProcessInstance, StateElement, ProcessInstance[])

toolbusStarting

public void toolbusStarting()
Description copied from interface: IViewer
Fired right before the debug ToolBus starts executing the process logic.

Specified by:
toolbusStarting in interface IViewer
See Also:
IViewer.toolbusStarting()

toolbusTerminating

public void toolbusTerminating()
Description copied from interface: IViewer
Fired right before then debug ToolBus shuts down.

Specified by:
toolbusTerminating in interface IViewer
See Also:
IViewer.toolbusTerminating()

updateState

public void updateState(int state)
Description copied from interface: IViewer
Informs the viewer about what the debug toolbus is currently doing. A list of possible states can be found in toolbus.viewer.IViewerConstants

Specified by:
updateState in interface IViewer
Parameters:
state - The state that identifies what the debug toolbus is currently doing.
See Also:
IViewer.updateState(int)

performanceStatsArrived

public void performanceStatsArrived(ToolInstance toolInstance,
                                    aterm.ATerm term)
Description copied from interface: IPerformanceMonitor
Fired when the performance statistics that were requested by the debug ToolBus arrived.

Specified by:
performanceStatsArrived in interface IPerformanceMonitor
Parameters:
toolInstance - The tool instance the performance statistics are associated with.
term - The term that contains the performance statistics data.
See Also:
IPerformanceMonitor.performanceStatsArrived(ToolInstance, ATerm)

toolConnected

public void toolConnected(ToolInstance toolInstance)
Description copied from interface: IPerformanceMonitor
Fired when a tool connects.

Specified by:
toolConnected in interface IPerformanceMonitor
Parameters:
toolInstance - The tool instance associated with the tool that connected.
See Also:
IPerformanceMonitor.toolConnected(ToolInstance)

toolConnectionClosed

public void toolConnectionClosed(ToolInstance toolInstance)
Description copied from interface: IPerformanceMonitor
Fired when a connection with a tool is terminated.

Specified by:
toolConnectionClosed in interface IPerformanceMonitor
Parameters:
toolInstance - The tool instance associated with the tool that is no longer connected.
See Also:
IPerformanceMonitor.toolConnectionClosed(ToolInstance)

The Meta-Environment API