@Deprecated public final class AnalysisController extends java.lang.Object implements IAnalysisController
AnalysisController can be used to configure, control, save
and load an analysis instance. It is responsible for the life cycle of the
readers, filters and repositories.| Modifier and Type | Class and Description |
|---|---|
static class |
AnalysisController.AnalysisControllerWithMapping
Deprecated.
This is a wrapper for the
AnalysisController which contains a mapping
between the model instances and the actual objects as well. |
static interface |
AnalysisController.IStateObserver
Deprecated.
This interface can be used for observers which want to get notified about
state changes of an analysis controller.
|
static class |
AnalysisController.STATE
Deprecated.
An enumeration used to describe the state of an
AnalysisController. |
CONFIG_PROPERTY_NAME_PROJECT_NAME, CONFIG_PROPERTY_NAME_RECORDS_TIME_UNIT| Constructor and Description |
|---|
AnalysisController()
Deprecated.
Constructs an
AnalysisController instance. |
AnalysisController(Configuration configuration)
Deprecated.
Constructs an
AnalysisController instance using the given parameter. |
AnalysisController(java.io.File file)
Deprecated.
This constructors creates an
AnalysisController instance, using the
given file to load an analysis model. |
AnalysisController(java.io.File file,
java.lang.ClassLoader classLoader)
Deprecated.
This constructors creates an
AnalysisController instance, using the
given file to load an analysis model and the given classloader to initialize
the objects. |
AnalysisController(MIProject project)
Deprecated.
Creates a new instance of the class
AnalysisController but uses the
given instance of MIProject to construct the analysis. |
AnalysisController(MIProject project,
java.lang.ClassLoader classLoader)
Deprecated.
Creates a new instance of the class
AnalysisController but uses the
given instance of @link{Project} to construct the analysis. |
AnalysisController(java.lang.String projectName)
Deprecated.
Constructs an
AnalysisController instance using the given parameter. |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitInitialization()
Deprecated.
Causes the calling thread to wait until the analysis controller has been
initialized.
|
void |
connect(AbstractPlugin src,
java.lang.String outputPortName,
AbstractPlugin dst,
java.lang.String inputPortName)
Deprecated.
This method should be used to connect two plugins.
|
void |
connect(AbstractPlugin plugin,
java.lang.String repositoryPort,
AbstractRepository repository)
Deprecated.
Connects the given repository to this plugin via the given name.
|
static AnalysisController.AnalysisControllerWithMapping |
createAnalysisController(MIProject project,
java.lang.ClassLoader classLoader)
Deprecated.
This is a factory method which can be used to create a new instance of
AnalysisController, but delivers the mapping between the
MIProject and the actual analysis. |
MIProject |
getCurrentConfiguration()
Deprecated.
This method delivers the current configuration of this instance as an instance of
MIProject. |
java.util.Collection<AbstractFilterPlugin> |
getFilters()
Deprecated.
Delivers an unmodifiable collection of all filters.
|
java.lang.String |
getProjectName()
Deprecated.
Delivers the current name of the project.
|
java.lang.String |
getProperty(java.lang.String key)
Deprecated.
Delivers the value for the given (global) property within the analysis.
|
java.util.Collection<AbstractReaderPlugin> |
getReaders()
Deprecated.
Delivers an unmodifiable collection of all readers.
|
java.util.Collection<AbstractRepository> |
getRepositories()
Deprecated.
Delivers an unmodifiable collection of all repositories.
|
AnalysisController.STATE |
getState()
Deprecated.
Delivers the current state of the analysis controller.
|
void |
handleKiekerMetadataRecord(KiekerMetadataRecord record)
Deprecated.
Called whenever an
KiekerMetadataRecord is found inside the filters
network. |
static MIProject |
loadFromFile(java.io.File file)
Deprecated.
This method can be used to load a meta model instance from a given file.
|
void |
registerFilter(AbstractFilterPlugin filter)
Deprecated.
Registers the given filter with this analysis instance.
|
void |
registerReader(AbstractReaderPlugin reader)
Deprecated.
Registers the given reader with this analysis instance.
|
void |
registerRepository(AbstractRepository repository)
Deprecated.
Registers the given repository with this analysis instance.
|
void |
registerStateObserver(AnalysisController.IStateObserver stateObserver)
Deprecated.
Registers the given instance as a new state observer.
|
void |
run()
Deprecated.
Starts an
AnalysisController instance. |
void |
saveToFile(java.io.File file)
Deprecated.
This method can be used to store the current configuration of this analysis controller in a specified file.
|
static void |
saveToFile(java.io.File file,
MIProject project)
Deprecated.
This method can be used to save the given instance of
MIProject
within a given file. |
void |
saveToFile(java.lang.String pathname)
Deprecated.
This method can be used to store the current configuration of this analysis controller in a specified file.
|
void |
terminate()
Deprecated.
Initiates a termination of the analysis.
|
void |
terminate(boolean error)
Deprecated.
Initiates a termination of the analysis.
|
boolean |
tryRegisterComponentName(java.lang.String name)
Deprecated.
This method tries to atomically register the given name for a component.
|
void |
unregisterStateObserver(AnalysisController.IStateObserver stateObserver)
Deprecated.
Unregisters the given instance from the state observers.
|
public AnalysisController()
AnalysisController instance.public AnalysisController(java.lang.String projectName)
AnalysisController instance using the given parameter.projectName - The name of the project.public AnalysisController(java.io.File file)
throws java.io.IOException,
AnalysisConfigurationException
AnalysisController instance, using the
given file to load an analysis model. The given file should therefore be an
instance of the analysis meta model.file - The configuration file for the analysis.java.io.IOException - If the given file could not be loaded
or is not a valid kax-configuration
file.AnalysisConfigurationException - If one or more plugins or repositories
could not be created, one or more
properties of the plugins are invalid
or if a connection between two filters
is not allowed.public AnalysisController(java.io.File file,
java.lang.ClassLoader classLoader)
throws java.io.IOException,
AnalysisConfigurationException
AnalysisController instance, using the
given file to load an analysis model and the given classloader to initialize
the objects. The given file should therefore be an instance of the analysis
meta model.file - The configuration file for the analysis.classLoader - The classloader used to initialize the plugins etc.java.io.IOException - If the given file could not be loaded
or is not a valid kax-configuration
file.AnalysisConfigurationException - If one or more plugins or repositories
could not be created, one or more
properties of the plugins are invalid
or if a connection between two filters
is not allowed.public AnalysisController(MIProject project) throws AnalysisConfigurationException
AnalysisController but uses the
given instance of MIProject to construct the analysis.project - The project instance for the analysis.AnalysisConfigurationException - If the given project could not be
loaded.java.lang.NullPointerException - If the project is null.public AnalysisController(MIProject project, java.lang.ClassLoader classLoader) throws AnalysisConfigurationException
AnalysisController but uses the
given instance of @link{Project} to construct the analysis.project - The project instance for the analysis.classLoader - The class loader used for the initializing.java.lang.NullPointerException - If the project is null.AnalysisConfigurationException - If the given project could not be
loaded.public AnalysisController(Configuration configuration)
AnalysisController instance using the given parameter.configuration - The global configuration of this analysis. All plugins
can indirectly access it.public final void handleKiekerMetadataRecord(KiekerMetadataRecord record)
KiekerMetadataRecord is found inside the filters
network.
Currently this method only logs all details.record - the KiekerMetadataRecord containing the informationpublic final void registerStateObserver(AnalysisController.IStateObserver stateObserver)
registerStateObserver in interface IAnalysisControllerstateObserver - The observer to be registered.public final void unregisterStateObserver(AnalysisController.IStateObserver stateObserver)
unregisterStateObserver in interface IAnalysisControllerstateObserver - The observer to be unregistered.public final java.lang.String getProperty(java.lang.String key)
getProperty in interface IProjectContextkey - The key of the property.public final void saveToFile(java.io.File file)
throws java.io.IOException,
AnalysisConfigurationException
saveToFile in interface IAnalysisControllerfile - The file in which the configuration will be stored.java.io.IOException - If an exception during the storage occurred.AnalysisConfigurationException - If the current configuration is somehow invalid.IAnalysisController.saveToFile(String)public final void saveToFile(java.lang.String pathname)
throws java.io.IOException,
AnalysisConfigurationException
#saveToFile(File).saveToFile in interface IAnalysisControllerpathname - The pathname of the file in which the configuration will be stored.java.io.IOException - If an exception during the storage occurred.AnalysisConfigurationException - If the current configuration is somehow invalid.IAnalysisController.saveToFile(File)public final void connect(AbstractPlugin src, java.lang.String outputPortName, AbstractPlugin dst, java.lang.String inputPortName) throws AnalysisConfigurationException
connect in interface IAnalysisControllersrc - The source plugin.outputPortName - The output port of the source plugin.dst - The destination plugin.inputPortName - The input port of the destination port.AnalysisConfigurationException - If the port names or the given plugins are invalid or not compatible.public final void connect(AbstractPlugin plugin, java.lang.String repositoryPort, AbstractRepository repository) throws AnalysisConfigurationException
connect in interface IAnalysisControllerplugin - The plugin to be connected.repositoryPort - The name of the port to connect the repository.repository - The repository which should be used.AnalysisConfigurationException - If the port names or the given objects are invalid or not compatible.public final MIProject getCurrentConfiguration() throws AnalysisConfigurationException
MIProject.getCurrentConfiguration in interface IProjectContextAnalysisConfigurationException - If the current configuration is somehow invalid.public final void run()
throws AnalysisConfigurationException
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.run in interface IAnalysisControllerAnalysisConfigurationException - If plugins with mandatory repositories have not been connected properly or couldn't be initialized.public final void awaitInitialization()
public final void terminate()
terminate in interface IAnalysisControllerpublic final void terminate(boolean error)
terminate in interface IAnalysisControllererror - Determines whether this is a normal termination or an termination due to an error during the analysis.public final void registerReader(AbstractReaderPlugin reader)
reader - The reader to register with this analysis.java.lang.IllegalStateException - If the analysis has already been started when
this method is called.public final void registerFilter(AbstractFilterPlugin filter)
filter - The filter to register with this analysis.java.lang.IllegalStateException - If the analysis has already been started when
this method is called.public final void registerRepository(AbstractRepository repository)
repository - The repository to register with this analysis.java.lang.IllegalStateException - If the analysis has already been started when
this method is called.public final java.lang.String getProjectName()
getProjectName in interface IProjectContextpublic final java.util.Collection<AbstractReaderPlugin> getReaders()
getReaders in interface IAnalysisControllerpublic final java.util.Collection<AbstractFilterPlugin> getFilters()
getFilters in interface IAnalysisControllerpublic final java.util.Collection<AbstractRepository> getRepositories()
getRepositories in interface IAnalysisControllerpublic final AnalysisController.STATE getState()
getState in interface IProjectContextpublic static final MIProject loadFromFile(java.io.File file) throws java.io.IOException
file - The file to be loaded.MIProject if everything went well.java.io.IOException - If something during loading went wrong.public static final void saveToFile(java.io.File file,
MIProject project)
throws java.io.IOException
MIProject
within a given file.file - The file to be used for the storage.project - The project to be stored.java.io.IOException - In case of errors.public static final AnalysisController.AnalysisControllerWithMapping createAnalysisController(MIProject project, java.lang.ClassLoader classLoader) throws AnalysisConfigurationException
AnalysisController, but delivers the mapping between the
MIProject and the actual analysis. It calls the constructor
AnalysisController(MIProject, ClassLoader).project - The project to be loaded.classLoader - The class loader used to load the instances.java.lang.NullPointerException - If the project is null.AnalysisConfigurationException - If the given project could not be
loaded.public boolean tryRegisterComponentName(java.lang.String name)
name - The component name to registerCopyright 2021 Kieker Project, http://kieker-monitoring.net