The Meta-Environment API

toolbus.viewer
Class PerformanceInformationHandler

java.lang.Object
  extended by toolbus.viewer.PerformanceInformationHandler

public class PerformanceInformationHandler
extends java.lang.Object

Handles performance information dispatch and retrieval.

Author:
Arnold Lankamp

Nested Class Summary
private static class PerformanceInformationHandler.PerformanceStatsEntryHandler
          Entry handler used for iterating over the arrived performance statistics.
 
Field Summary
private  toolbus.util.collections.ConcurrentHashMap<ToolInstance,aterm.ATerm> arrivedPerformanceStats
           
private  IPerformanceMonitor performanceMonitor
           
private  PerformanceInformationHandler.PerformanceStatsEntryHandler performanceStatsEntryHandler
           
private  toolbus.util.collections.ConcurrentHashSet<aterm.ATerm> toolInstancesToMonitor
           
private  toolbus.util.collections.ConcurrentHashSet<java.lang.String> toolTypesToMonitor
           
 
Constructor Summary
PerformanceInformationHandler(IPerformanceMonitor performanceMonitor)
          Constructor.
 
Method Summary
 void handleRetrievedData()
          Invoked by the debug toolbus when it wishes to process all currently received performance data.
 void startMonitoringTool(aterm.ATerm toolKey)
          Initiates the monitoring of the tool associated with the given tool key.
 void startMonitorToolType(java.lang.String toolName)
          Initiates the monitoring of the given tool type.
 void stopMonitoringTool(aterm.ATerm toolKey)
          Stops monitoring the tool associated with the given tool key.
 void stopMonitoringToolType(java.lang.String toolName)
          Stops monitoring tools of the given type.
 void toolCommunicationTriggered(ToolInstance toolInstance, int operation)
          Invoked by the debug toolbus when communication with a tool instance occured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

performanceMonitor

private final IPerformanceMonitor performanceMonitor

toolInstancesToMonitor

private final toolbus.util.collections.ConcurrentHashSet<aterm.ATerm> toolInstancesToMonitor

toolTypesToMonitor

private final toolbus.util.collections.ConcurrentHashSet<java.lang.String> toolTypesToMonitor

arrivedPerformanceStats

private final toolbus.util.collections.ConcurrentHashMap<ToolInstance,aterm.ATerm> arrivedPerformanceStats

performanceStatsEntryHandler

private final PerformanceInformationHandler.PerformanceStatsEntryHandler performanceStatsEntryHandler
Constructor Detail

PerformanceInformationHandler

public PerformanceInformationHandler(IPerformanceMonitor performanceMonitor)
Constructor.

Parameters:
performanceMonitor - The tool performance monitor to use.
Method Detail

startMonitoringTool

public void startMonitoringTool(aterm.ATerm toolKey)
Initiates the monitoring of the tool associated with the given tool key.

Parameters:
toolKey - The tool key associated with the tool we want to monitor.

stopMonitoringTool

public void stopMonitoringTool(aterm.ATerm toolKey)
Stops monitoring the tool associated with the given tool key.

Parameters:
toolKey - The tool key associated with the tool which we want to stop monitoring.

startMonitorToolType

public void startMonitorToolType(java.lang.String toolName)
Initiates the monitoring of the given tool type.

Parameters:
toolName - The tool type of tool we want to monitor.

stopMonitoringToolType

public void stopMonitoringToolType(java.lang.String toolName)
Stops monitoring tools of the given type.

Parameters:
toolName - The type of tool which we want to stop monitoring.

toolCommunicationTriggered

public void toolCommunicationTriggered(ToolInstance toolInstance,
                                       int operation)
Invoked by the debug toolbus when communication with a tool instance occured.

Parameters:
toolInstance - The tool instance that received the data.
operation - The operation associated with the received data.

handleRetrievedData

public void handleRetrievedData()
Invoked by the debug toolbus when it wishes to process all currently received performance data.


The Meta-Environment API