Search in sources :

Example 1 with WebWorkerException

use of org.drools.workbench.services.verifier.plugin.client.api.WebWorkerException in project drools-wb by kiegroup.

the class Receiver method init.

private void init(final Initialize initialize) {
    try {
        final AnalyzerBuilder analyzerBuilder = new AnalyzerBuilder().with(initialize).with(runnerType).with(new Reporter() {

            @Override
            public void sendReport(final Set<Issue> issues) {
                latestReport = new Issues(initialize.getUuid(), issues);
                poster.post(latestReport);
            }

            @Override
            public void sendStatus(final Status status) {
                poster.post(status);
            }
        });
        analyzer = analyzerBuilder.buildAnalyzer();
        index = analyzerBuilder.getIndex();
        configuration = analyzerBuilder.getConfiguration();
        analyzer.resetChecks();
        analyzer.analyze();
    } catch (final BuildException e) {
        poster.post(new WebWorkerException("Initialization failed: " + e.getMessage()));
    }
}
Also used : RequestStatus(org.drools.workbench.services.verifier.plugin.client.api.RequestStatus) Status(org.drools.workbench.services.verifier.api.client.Status) Issue(org.drools.workbench.services.verifier.api.client.reporting.Issue) Issues(org.drools.workbench.services.verifier.api.client.reporting.Issues) Reporter(org.drools.workbench.services.verifier.core.main.Reporter) WebWorkerException(org.drools.workbench.services.verifier.plugin.client.api.WebWorkerException) BuildException(org.drools.workbench.services.verifier.plugin.client.builders.BuildException)

Aggregations

Status (org.drools.workbench.services.verifier.api.client.Status)1 Issue (org.drools.workbench.services.verifier.api.client.reporting.Issue)1 Issues (org.drools.workbench.services.verifier.api.client.reporting.Issues)1 Reporter (org.drools.workbench.services.verifier.core.main.Reporter)1 RequestStatus (org.drools.workbench.services.verifier.plugin.client.api.RequestStatus)1 WebWorkerException (org.drools.workbench.services.verifier.plugin.client.api.WebWorkerException)1 BuildException (org.drools.workbench.services.verifier.plugin.client.builders.BuildException)1