/** * {@inheritDoc} */ @Override public final void terminate() { this.terminate(false); }
/** * Initiates a termination of the executed {@link AnalysisController}. */ public void terminate() { synchronized (this) { this.analysisController.terminate(); } } }
/** * {@inheritDoc} */ @Override public final void saveToFile(final File file) throws IOException, AnalysisConfigurationException { final MIProject mProject = this.getCurrentConfiguration(); AnalysisController.saveToFile(file, mProject); }
public static void main(final String[] args) { final IAnalysisController analysisController = new AnalysisController("TCPThroughput"); TestTCPReader.createAndConnectPlugins(analysisController); try { analysisController.run(); } catch (final AnalysisConfigurationException ex) { TestTCPReader.LOGGER.error("Failed to start the example project.", ex); } }
/** * This is a factory method which can be used to create a new instance of {@link AnalysisController}, but delivers the mapping between the {@link MIProject} and * the actual analysis. It calls the constructor {@code AnalysisController(MIProject, ClassLoader)}. * * @param project * The project to be loaded. * @param classLoader * The class loader used to load the instances. * @return The newly created controller and the mapping. * @throws NullPointerException * If the project is null. * @throws AnalysisConfigurationException * If the given project could not be loaded. */ public static final AnalysisControllerWithMapping createAnalysisController(final MIProject project, final ClassLoader classLoader) throws NullPointerException, AnalysisConfigurationException { final AnalysisController controller = new AnalysisController(project, classLoader); return new AnalysisControllerWithMapping(controller, controller.pluginModelMap, controller.repositoryModelMap); }
/** * Creates an instance of this class. */ public ForecastingFilterTest() { this.controller = new AnalysisController(); }
@Override protected void checkControllerStateAfterRecordsPassedToController(final IMonitoringController monitoringController) throws Exception { Assert.assertTrue(monitoringController.isMonitoringEnabled()); monitoringController.terminateMonitoring(); this.analysisThread.awaitTermination(); Assert.assertEquals(AnalysisController.STATE.TERMINATED, this.analysisController.getState()); }
/** * Runs the setup by starting the enclosed analysis controller. * * @throws AnalysisConfigurationException * If an invalid configuration is detected */ public void run() throws AnalysisConfigurationException { this.analysisController.run(); }
public String getProperty(final String key) { return this.projectContext.getProperty(key); } }
/** * Constructs an {@link AnalysisController} instance using the given parameter. * * @param projectName * The name of the project. */ public AnalysisController(final String projectName) { this(AnalysisController.createConfigurationWithProjectName(projectName)); }
/** * This method runs through all observers and informs them about the current state. */ private final void notifyStateObservers() { // Get the current state to make sure that all observers get the same state. final STATE currState = this.state; // Now inform the observers. for (final IStateObserver observer : this.stateObservers) { observer.update(this, currState); } }
/** * This is a factory method which can be used to create a new instance of {@link AnalysisController}, but delivers the mapping between the {@link MIProject} and * the actual analysis. It calls the constructor {@code AnalysisController(MIProject, ClassLoader)}. * * @param project * The project to be loaded. * @param classLoader * The class loader used to load the instances. * @return The newly created controller and the mapping. * @throws NullPointerException * If the project is null. * @throws AnalysisConfigurationException * If the given project could not be loaded. */ public static final AnalysisControllerWithMapping createAnalysisController(final MIProject project, final ClassLoader classLoader) throws NullPointerException, AnalysisConfigurationException { final AnalysisController controller = new AnalysisController(project, classLoader); return new AnalysisControllerWithMapping(controller, controller.pluginModelMap, controller.repositoryModelMap); }
@Override protected void checkControllerStateAfterRecordsPassedToController(final IMonitoringController monitoringController) throws Exception { Assert.assertTrue(monitoringController.isMonitoringEnabled()); monitoringController.terminateMonitoring(); this.analysisThread.awaitTermination(); Assert.assertEquals(AnalysisController.STATE.TERMINATED, this.analysisController.getState()); }
public void startAndWaitForTermination() throws IllegalStateException, AnalysisConfigurationException { this.analysisController.run(); }
/** * {@inheritDoc} */ @Override public final void saveToFile(final File file) throws IOException, AnalysisConfigurationException { final MIProject mProject = this.getCurrentConfiguration(); AnalysisController.saveToFile(file, mProject); }
/** * {@inheritDoc} */ @Override public final void terminate() { this.terminate(false); }
/** * Initiates a termination of the executed {@link AnalysisController}. */ public void terminate() { synchronized (this) { this.analysisController.terminate(); } } }
/** * Constructs an {@link AnalysisController} instance using the given parameter. * * @param projectName * The name of the project. */ public AnalysisController(final String projectName) { this(AnalysisController.createConfigurationWithProjectName(projectName)); }
/** * This method runs through all observers and informs them about the current state. */ private final void notifyStateObservers() { // Get the current state to make sure that all observers get the same state. final STATE currState = this.state; // Now inform the observers. for (final IStateObserver observer : this.stateObservers) { observer.update(this, currState); } }
@Override protected void checkControllerStateAfterRecordsPassedToController(final IMonitoringController monitoringController) throws Exception { Assert.assertTrue(monitoringController.isMonitoringEnabled()); monitoringController.terminateMonitoring(); this.analysisThread.awaitTermination(); Assert.assertEquals(AnalysisController.STATE.TERMINATED, this.analysisController.getState()); }