Kieker 1.9

kieker.analysis.plugin
Interface IPlugin

All Superinterfaces:
IAnalysisComponent
All Known Subinterfaces:
IFilterPlugin, IReaderPlugin, IWebVisualizationFilterPlugin
All Known Implementing Classes:
AbstractAggregatedCallTreeFilter, AbstractCallTreeFilter, AbstractDependencyGraphFilter, AbstractExecutionTraceProcessingFilter, AbstractFilterPlugin, AbstractGraphFilter, AbstractGraphProducingFilter, AbstractInvalidExecutionTraceProcessingFilter, AbstractMessageTraceProcessingFilter, AbstractPlugin, AbstractReaderPlugin, AbstractTraceAnalysisFilter, AbstractTraceProcessingFilter, AbstractWebVisualizationFilterPlugin, AggregatedAllocationComponentOperationCallTreeFilter, AggregatedAssemblyComponentOperationCallTreeFilter, AnalysisThroughputFilter, AnomalyDetectionFilter, AnomalyScoreCalculationFilter, AnomalyScoreVisualizationFilter, ComponentDependencyGraphAllocationFilter, ComponentDependencyGraphAssemblyFilter, ContainerDependencyGraphFilter, CountingFilter, CPUUtilizationDisplayFilter, CurrentTimeEventGenerationFilter, DbReader, DescriptionDecoratorFilter, EventRecordTraceCounter, EventRecordTraceReconstructionFilter, ExecutionRecordTransformationFilter, ExecutionTraceWriterFilter, ExtractionFilter, ForecastingFilter, FSReader, GraphWriterPlugin, InvalidExecutionTraceWriterFilter, JMSReader, JMXReader, ListCollectionFilter, ListReader, MemSwapUtilizationDisplayFilter, MessageTraceWriterFilter, MethodAndComponentFlowDisplayFilter, MonitoringRecordLoggerFilter, MonitoringThroughputFilter, OperationDependencyGraphAllocationFilter, OperationDependencyGraphAssemblyFilter, PipeReader, PlainTextWebVisualization, RealtimeRecordDelayFilter, SequenceDiagramFilter, StringBufferFilter, SystemModel2FileFilter, TCPReader, TeeFilter, TimeReader, TimeSeriesPointAggregatorFilter, TimestampFilter, TraceAggregationFilter, TraceCallTreeFilter, TraceColoringFilter, TraceEquivalenceClassFilter, TraceEventRecords2ExecutionAndMessageTraceFilter, TraceIdFilter, TraceReconstructionFilter, TypeFilter, UniteMeasurementPairFilter

public interface IPlugin
extends IAnalysisComponent

This is the interface for plugins within Kieker.

Since:
1.5
Author:
Nils Christian Ehmke, Jan Waller

Nested Class Summary
static class IPlugin.PluginInputPortReference
          This simple class represents a container for the reference between a plugin, its input port and the corresponding method.
static class IPlugin.STATE
          An enumeration used to describe the state of an AbstractPlugin.
 
Method Summary
 void connect(String name, AbstractRepository repo)
          Connects the given repository to this plugin via the given name.
 String[] getAllDisplayNames()
          Delivers an array containing all display names.
 String[] getAllInputPortNames()
          Delivers an array containing all input port names.
 String[] getAllOutputPortNames()
          Delivers an array containing all output port names.
 String[] getAllRepositoryPortNames()
          Delivers an array containing all repository port names.
 List<IPlugin.PluginInputPortReference> getConnectedPlugins(String outputPortName)
          Delivers the plugins with their ports which are connected with the given output port.
 Configuration getCurrentConfiguration()
          This method should deliver a Configuration object containing the current configuration of this instance.
 Map<String,AbstractRepository> getCurrentRepositories()
          This method delivers an array of AbstractRepository containing the current repositories of this instance.
 String getName()
          This method delivers the current name of this plugin instance.
 String getPluginDescription()
          This method delivers the description of this plugin type.
 String getPluginName()
          This method delivers the plugin name of this plugin.
 IPlugin.STATE getState()
           
 boolean init()
          Initiates the start of a component.
 void terminate(boolean error)
          Initiates a termination of the plugin.
 

Method Detail

init

boolean init()
Initiates the start of a component. This method is called once when a AnalysisController's run() method is called. This implementation must not be blocking! Asynchronous consumers would spawn (an) asynchronous thread(s) in this method.

Returns:
true on success; false otherwise.
Since:
1.6

terminate

void terminate(boolean error)
Initiates a termination of the plugin. This method is only used by the framework and should not be called manually. Use the method AnalysisController.terminate(boolean) instead. After receiving this notification, the plugin should terminate any running methods, e.g., read for readers.

Parameters:
error - Determines whether the plugin is terminated due to an error or not.
Since:
1.6

getCurrentConfiguration

Configuration getCurrentConfiguration()
This method should deliver a Configuration object containing the current configuration of this instance. In other words: The constructor should be able to use the given object to initialize a new instance of this class with the same intern properties.

Specified by:
getCurrentConfiguration in interface IAnalysisComponent
Returns:
A completely filled configuration object.
Since:
1.5

getPluginName

String getPluginName()
This method delivers the plugin name of this plugin. The name should be unique, e.g., the classname.

Returns:
The name of the plugin.
Since:
1.5

getPluginDescription

String getPluginDescription()
This method delivers the description of this plugin type.

Returns:
The description of the plugin type.
Since:
1.5

getName

String getName()
This method delivers the current name of this plugin instance. The name does not have to be unique.

Specified by:
getName in interface IAnalysisComponent
Returns:
The current name of the plugin instance.
Since:
1.5

connect

void connect(String name,
             AbstractRepository repo)
             throws AnalysisConfigurationException
Connects the given repository to this plugin via the given name. DO NOT USE THIS METHOD! Use AnalysisController.connect instead!

Parameters:
name - The name of the port to connect the repository.
repo - The repository which should be used.
Throws:
AnalysisConfigurationException - if the repository-port is invalid, the repository itself is incompatible or the port is already used.
Since:
1.5

getCurrentRepositories

Map<String,AbstractRepository> getCurrentRepositories()
This method delivers an array of AbstractRepository containing the current repositories of this instance. In other words: The constructor should be able to use the given object to initialize a new instance of this class with the same intern properties.

Returns:
An (possible empty) array of repositories.
Since:
1.5

getAllOutputPortNames

String[] getAllOutputPortNames()
Delivers an array containing all output port names.

Returns:
An array with all available output port names.
Since:
1.5

getAllInputPortNames

String[] getAllInputPortNames()
Delivers an array containing all input port names.

Returns:
An array with all available input port names.
Since:
1.5

getAllDisplayNames

String[] getAllDisplayNames()
Delivers an array containing all display names.

Returns:
An array with all available display names.
Since:
1.6

getAllRepositoryPortNames

String[] getAllRepositoryPortNames()
Delivers an array containing all repository port names.

Returns:
An array with all available repository port names.
Since:
1.7

getConnectedPlugins

List<IPlugin.PluginInputPortReference> getConnectedPlugins(String outputPortName)
Delivers the plugins with their ports which are connected with the given output port.

Parameters:
outputPortName - The name of the output port.
Returns:
An array of pairs, whereat the first element is the plugin and the second one the name of the input port. If the given output port is invalid, null is returned
Since:
1.5

getState

IPlugin.STATE getState()
Returns:
the current state of the plugin
Since:
1.6

Kieker 1.9

Copyright 2014 Kieker Project, http://kieker-monitoring.net