Kieker 1.7

kieker.analysis.plugin
Interface IPlugin

All Superinterfaces:
IAnalysisComponent
All Known Subinterfaces:
IFilterPlugin, IReaderPlugin
All Known Implementing Classes:
AbstractAggregatedCallTreeFilter, AbstractCallTreeFilter, AbstractDependencyGraphFilter, AbstractExecutionTraceProcessingFilter, AbstractFilterPlugin, AbstractGraphFilter, AbstractGraphProducingFilter, AbstractInvalidExecutionTraceProcessingFilter, AbstractMessageTraceProcessingFilter, AbstractPlugin, AbstractReaderPlugin, AbstractTimestampFilter, AbstractTraceAnalysisFilter, AbstractTraceIdFilter, AbstractTraceProcessingFilter, AggregatedAllocationComponentOperationCallTreeFilter, AggregatedAssemblyComponentOperationCallTreeFilter, ComponentDependencyGraphAllocationFilter, ComponentDependencyGraphAssemblyFilter, ContainerDependencyGraphFilter, CountingFilter, CountingThroughputFilter, CurrentTimeEventGenerationFilter, DbReader, DescriptionDecoratorFilter, EventRecordTraceCounter, EventRecordTraceReconstructionFilter, ExecutionRecordTransformationFilter, ExecutionTraceWriterFilter, FSReader, GraphWriterPlugin, InvalidExecutionTraceWriterFilter, JMSReader, JMXReader, ListCollectionFilter, ListReader, MessageTraceWriterFilter, MonitoringRecordLoggerFilter, OperationDependencyGraphAllocationFilter, OperationDependencyGraphAssemblyFilter, PipeReader, RealtimeRecordDelayFilter, SequenceDiagramFilter, StringBufferFilter, SystemModel2FileFilter, TeeFilter, TimestampFilter, TimestampFilter, TraceCallTreeFilter, TraceColoringFilter, TraceEquivalenceClassFilter, TraceEventRecords2ExecutionAndMessageTraceFilter, TraceIdFilter, TraceIdFilter, TraceReconstructionFilter, TypeFilter

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.7

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