Package kieker.analysis.plugin
Class AbstractPlugin
java.lang.Object
kieker.analysis.analysisComponent.AbstractAnalysisComponent
kieker.analysis.plugin.AbstractPlugin
- All Implemented Interfaces:
IAnalysisComponent,IPlugin
- Direct Known Subclasses:
AbstractFilterPlugin,AbstractReaderPlugin
@Deprecated public abstract class AbstractPlugin extends AbstractAnalysisComponent implements IPlugin
Deprecated.
since 1.15.1 old plugin api
Do not inherit directly from this class! Instead inherit from the class
AbstractFilterPlugin or
AbstractReaderPlugin.- Since:
- 1.5
- Author:
- Nils Christian Ehmke, Jan Waller
-
Nested Class Summary
Nested classes/interfaces inherited from interface kieker.analysis.plugin.IPlugin
IPlugin.PluginInputPortReference, IPlugin.STATE -
Field Summary
Fields inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
CONFIG_NAME, configuration, logger, projectContext, recordsTimeUnitFromProjectContext -
Constructor Summary
Constructors Constructor Description AbstractPlugin(Configuration configuration, IProjectContext projectContext)Deprecated.Each Plugin requires a constructor with a Configuration object and an IProjectContext. -
Method Summary
Modifier and Type Method Description booleanareAllRepositoryPortsConnected()Deprecated.This method checks whether all repository ports of the current plugin are connected.voidconnect(java.lang.String reponame, AbstractRepository repository)Deprecated.Connects the given repository to this plugin via the given name.static voidconnect(AbstractPlugin src, java.lang.String outputPortName, AbstractPlugin dst, java.lang.String inputPortName)Deprecated.This method connects two plugins.protected booleandeliver(java.lang.String outputPortName, java.lang.Object data)Deprecated.Delivers the given data to all registered input ports of the given output port.java.lang.String[]getAllDisplayNames()Deprecated.Delivers an array containing all display names.java.lang.String[]getAllInputPortNames()Deprecated.Delivers an array containing all input port names.java.lang.String[]getAllOutputPortNames()Deprecated.Delivers an array containing all output port names.java.lang.String[]getAllRepositoryPortNames()Deprecated.Delivers an array containing all repository port names.java.util.List<IPlugin.PluginInputPortReference>getConnectedPlugins(java.lang.String outputPortName)Deprecated.Delivers the plugins with their ports which are connected with the given output port.java.util.Map<java.lang.String,AbstractRepository>getCurrentRepositories()Deprecated.This method delivers an array ofAbstractRepositorycontaining the current repositories of this instance.protected ConfigurationgetDefaultConfiguration()Deprecated.This method delivers an instance ofConfigurationcontaining the default properties for this class.java.util.Set<AbstractPlugin>getIncomingPlugins(boolean transitive)Deprecated.Returns the plugins which provide data to this plugin.java.lang.StringgetPluginDescription()Deprecated.This method delivers the description of this plugin type.java.lang.StringgetPluginName()Deprecated.This method delivers the plugin name of this plugin.protected AbstractRepositorygetRepository(java.lang.String reponame)Deprecated.Delivers the registered repository for the given name or null, if it doesn't exist.IPlugin.STATEgetState()Deprecated.static booleanisConnectionAllowed(AbstractPlugin src, java.lang.String output, AbstractPlugin dst, java.lang.String input)Deprecated.This method checks whether two plugins can be connected.protected voidnotifyNewIncomingConnection(java.lang.String inputPortName, AbstractPlugin connectedPlugin, java.lang.String outputPortName)Deprecated.Notification method which is called when a new incoming connection to this plugin is established.protected voidnotifyNewOutgoingConnection(java.lang.String outputPortName, AbstractPlugin connectedPlugin, java.lang.String inputPortName)Deprecated.Notification method which is called when a new outgoing connection from this plugin is established.voidshutdown(boolean error)Deprecated.Initializes a shutdown of this and all incoming plugins.booleanstart()Deprecated.Starts this plugin.Methods inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
getCurrentConfiguration, getNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface kieker.analysis.plugin.IPlugin
getCurrentConfiguration, getName, init, terminate
-
Constructor Details
-
AbstractPlugin
Deprecated.Each Plugin requires a constructor with a Configuration object and an IProjectContext.- Parameters:
configuration- The configuration for this component.projectContext- The project context for this component. The component will be registered.
-
-
Method Details
-
deliver
protected final boolean deliver(java.lang.String outputPortName, java.lang.Object data)Deprecated.Delivers the given data to all registered input ports of the given output port.- Parameters:
outputPortName- The output port to be used to send the given data.data- The data to be send; must not be null.- Returns:
- true if and only if the given output port does exist and if the data is not null and if it suits the port's event types.
-
connect
public final void connect(java.lang.String reponame, AbstractRepository repository) throws AnalysisConfigurationExceptionDeprecated.Connects the given repository to this plugin via the given name. DO NOT USE THIS METHOD! UseAnalysisController.connectinstead!- Specified by:
connectin interfaceIPlugin- Parameters:
reponame- The name of the port to connect the repository.repository- 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.
-
connect
public static final void connect(AbstractPlugin src, java.lang.String outputPortName, AbstractPlugin dst, java.lang.String inputPortName) throws AnalysisConfigurationExceptionDeprecated.This method connects two plugins. DO NOT USE THIS METHOD! UseAnalysisController.connectinstead!- Parameters:
src- The source plugin.outputPortName- The output port of the source plugin.dst- The destination plugin.inputPortName- The input port of the destination port.- Throws:
AnalysisConfigurationException- if any given plugin is invalid, any output or input port doesn't exist or if they are incompatible. Furthermore the destination plugin must not be a reader.
-
isConnectionAllowed
public static final boolean isConnectionAllowed(AbstractPlugin src, java.lang.String output, AbstractPlugin dst, java.lang.String input)Deprecated.This method checks whether two plugins can be connected.- Parameters:
src- The source plugin.output- The output port of the source plugin.dst- The destination plugin.input- The input port of the destination port.- Returns:
- true if and only if both given plugins are valid, the output and input ports exist and if they are compatible. Furthermore the destination plugin must not be a reader.
-
getDefaultConfiguration
Deprecated.This method delivers an instance ofConfigurationcontaining the default properties for this class.- Specified by:
getDefaultConfigurationin classAbstractAnalysisComponent- Returns:
- The default properties.
-
getPluginName
public final java.lang.String getPluginName()Deprecated.This method delivers the plugin name of this plugin. The name should be unique, e.g., the classname.- Specified by:
getPluginNamein interfaceIPlugin- Returns:
- The name of the plugin.
-
getPluginDescription
public final java.lang.String getPluginDescription()Deprecated.This method delivers the description of this plugin type.- Specified by:
getPluginDescriptionin interfaceIPlugin- Returns:
- The description of the plugin type.
-
areAllRepositoryPortsConnected
public final boolean areAllRepositoryPortsConnected()Deprecated.This method checks whether all repository ports of the current plugin are connected.- Returns:
- true if and only if all plugin ports (defined in the annotation) are connected to a repository.
-
getCurrentRepositories
Deprecated.This method delivers an array ofAbstractRepositorycontaining 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.- Specified by:
getCurrentRepositoriesin interfaceIPlugin- Returns:
- An (possible empty) array of repositories.
-
getRepository
Deprecated.Delivers the registered repository for the given name or null, if it doesn't exist.- Parameters:
reponame- The name (key) of the repository.- Returns:
- The registered repository instance.
-
getAllOutputPortNames
public final java.lang.String[] getAllOutputPortNames()Deprecated.Delivers an array containing all output port names.- Specified by:
getAllOutputPortNamesin interfaceIPlugin- Returns:
- An array with all available output port names.
-
getAllInputPortNames
public final java.lang.String[] getAllInputPortNames()Deprecated.Delivers an array containing all input port names.- Specified by:
getAllInputPortNamesin interfaceIPlugin- Returns:
- An array with all available input port names.
-
getAllDisplayNames
public final java.lang.String[] getAllDisplayNames()Deprecated.Delivers an array containing all display names.- Specified by:
getAllDisplayNamesin interfaceIPlugin- Returns:
- An array with all available display names.
-
getAllRepositoryPortNames
public final java.lang.String[] getAllRepositoryPortNames()Deprecated.Delivers an array containing all repository port names.- Specified by:
getAllRepositoryPortNamesin interfaceIPlugin- Returns:
- An array with all available repository port names.
-
getConnectedPlugins
public final java.util.List<IPlugin.PluginInputPortReference> getConnectedPlugins(java.lang.String outputPortName)Deprecated.Delivers the plugins with their ports which are connected with the given output port.- Specified by:
getConnectedPluginsin interfaceIPlugin- 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
-
getState
Deprecated. -
start
public final boolean start()Deprecated.Starts this plugin.- Returns:
- true if and only if the start procedure was sucesful.
-
shutdown
public final void shutdown(boolean error)Deprecated.Initializes a shutdown of this and all incoming plugins.- Parameters:
error- A flag determining whether this plugin has to be shutdown due to an error or not.
-
getIncomingPlugins
Deprecated.Returns the plugins which provide data to this plugin.- Parameters:
transitive- Denotes whether indirect (i.e. non-immediate) providers should be returned- Returns:
- A set of plugins which directly or indirectly (see above) provide data for this plugin
-
notifyNewIncomingConnection
protected void notifyNewIncomingConnection(java.lang.String inputPortName, AbstractPlugin connectedPlugin, java.lang.String outputPortName) throws AnalysisConfigurationExceptionDeprecated.Notification method which is called when a new incoming connection to this plugin is established.- Parameters:
inputPortName- The input port name to which the connection was establishedconnectedPlugin- The plugin that was connectedoutputPortName- The opposing plugin's output port from which the connection was established- Throws:
AnalysisConfigurationException- If an error occurs while processing of this notification
-
notifyNewOutgoingConnection
protected void notifyNewOutgoingConnection(java.lang.String outputPortName, AbstractPlugin connectedPlugin, java.lang.String inputPortName) throws AnalysisConfigurationExceptionDeprecated.Notification method which is called when a new outgoing connection from this plugin is established.- Parameters:
outputPortName- The output port name to which the connection was establishedconnectedPlugin- The plugin that was connectedinputPortName- The opposing plugin's input port from which the connection was established- Throws:
AnalysisConfigurationException- If an error occurs while processing of this notification
-