Kieker 1.12

kieker.analysis
Interface IAnalysisController

All Superinterfaces:
IProjectContext
All Known Implementing Classes:
AnalysisController

public interface IAnalysisController
extends IProjectContext

This is the interface to AnalysisController, allowing not only to access read-methods but also to modify the analysis itself.

Since:
1.7
Author:
Nils Christian Ehmke

Field Summary
 
Fields inherited from interface kieker.analysis.IProjectContext
CONFIG_PROPERTY_NAME_PROJECT_NAME, CONFIG_PROPERTY_NAME_RECORDS_TIME_UNIT
 
Method Summary
 void connect(AbstractPlugin src, java.lang.String outputPortName, AbstractPlugin dst, java.lang.String inputPortName)
          This method should be used to connect two plugins.
 void connect(AbstractPlugin plugin, java.lang.String repositoryPort, AbstractRepository repository)
          Connects the given repository to this plugin via the given name.
 java.util.Collection<AbstractFilterPlugin> getFilters()
          Delivers an unmodifiable collection of all filters.
 java.util.Collection<AbstractReaderPlugin> getReaders()
          Delivers an unmodifiable collection of all readers.
 java.util.Collection<AbstractRepository> getRepositories()
          Delivers an unmodifiable collection of all repositories.
 void registerStateObserver(AnalysisController.IStateObserver stateObserver)
          Registers the given instance as a new state observer.
 void run()
          Starts an AnalysisController instance.
 void saveToFile(java.io.File file)
          This method can be used to store the current configuration of this analysis controller in a specified file.
 void saveToFile(java.lang.String pathname)
          This method can be used to store the current configuration of this analysis controller in a specified file.
 void terminate()
          Initiates a termination of the analysis.
 void terminate(boolean error)
          Initiates a termination of the analysis.
 void unregisterStateObserver(AnalysisController.IStateObserver stateObserver)
          Unregisters the given instance from the state observers.
 
Methods inherited from interface kieker.analysis.IProjectContext
getCurrentConfiguration, getProjectName, getProperty, getState
 

Method Detail

registerStateObserver

void registerStateObserver(AnalysisController.IStateObserver stateObserver)
Registers the given instance as a new state observer. All instances are informed when the state (Running, Terminated etc) changes and get the new state as an object.

Parameters:
stateObserver - The observer to be registered.
Since:
1.7

unregisterStateObserver

void unregisterStateObserver(AnalysisController.IStateObserver stateObserver)
Unregisters the given instance from the state observers.

Parameters:
stateObserver - The observer to be unregistered.
Since:
1.7

saveToFile

void saveToFile(java.io.File file)
                throws java.io.IOException,
                       AnalysisConfigurationException
This method can be used to store the current configuration of this analysis controller in a specified file. The file can later be used to initialize the analysis controller.

Parameters:
file - The file in which the configuration will be stored.
Throws:
java.io.IOException - If an exception during the storage occurred.
AnalysisConfigurationException - If the current configuration is somehow invalid.
Since:
1.7
See Also:
saveToFile(String)

saveToFile

void saveToFile(java.lang.String pathname)
                throws java.io.IOException,
                       AnalysisConfigurationException
This method can be used to store the current configuration of this analysis controller in a specified file. It is just a convenient method which does the same as #saveToFile(File).

Parameters:
pathname - The pathname of the file in which the configuration will be stored.
Throws:
java.io.IOException - If an exception during the storage occurred.
AnalysisConfigurationException - If the current configuration is somehow invalid.
Since:
1.7
See Also:
saveToFile(File)

connect

void connect(AbstractPlugin src,
             java.lang.String outputPortName,
             AbstractPlugin dst,
             java.lang.String inputPortName)
             throws java.lang.IllegalStateException,
                    AnalysisConfigurationException
This method should be used to connect two plugins. The plugins have to be registered within this controller instance.

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:
java.lang.IllegalStateException - If this instance has already been started or has already been terminated.
AnalysisConfigurationException - If the port names or the given plugins are invalid or not compatible.
Since:
1.7

connect

void connect(AbstractPlugin plugin,
             java.lang.String repositoryPort,
             AbstractRepository repository)
             throws java.lang.IllegalStateException,
                    AnalysisConfigurationException
Connects the given repository to this plugin via the given name.

Parameters:
plugin - The plugin to be connected.
repositoryPort - The name of the port to connect the repository.
repository - The repository which should be used.
Throws:
java.lang.IllegalStateException - If this instance has already been started or has already been terminated.
AnalysisConfigurationException - If the port names or the given objects are invalid or not compatible.
Since:
1.7

run

void run()
         throws java.lang.IllegalStateException,
                AnalysisConfigurationException
Starts an AnalysisController instance. The method returns after all configured readers finished reading and all analysis plug-ins terminated On errors during the initialization, Exceptions are thrown.

Throws:
java.lang.IllegalStateException - If the current instance has already been started or already been terminated.
AnalysisConfigurationException - If plugins with mandatory repositories have not been connected properly or couldn't be initialized.
Since:
1.7

terminate

void terminate()
Initiates a termination of the analysis.

Since:
1.7

terminate

void terminate(boolean error)
Initiates a termination of the analysis.

Parameters:
error - Determines whether this is a normal termination or an termination due to an error during the analysis.
Since:
1.7

getReaders

java.util.Collection<AbstractReaderPlugin> getReaders()
Delivers an unmodifiable collection of all readers.

Returns:
All registered readers.
Since:
1.7

getFilters

java.util.Collection<AbstractFilterPlugin> getFilters()
Delivers an unmodifiable collection of all filters.

Returns:
All registered filters.
Since:
1.7

getRepositories

java.util.Collection<AbstractRepository> getRepositories()
Delivers an unmodifiable collection of all repositories.

Returns:
All registered repositories.
Since:
1.7

Kieker 1.12

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