Search in sources :

Example 1 with ExporterLoadException

use of io.camunda.zeebe.broker.exporter.repo.ExporterLoadException in project zeebe by zeebe-io.

the class Broker method buildExporterRepository.

private ExporterRepository buildExporterRepository(final BrokerCfg cfg) {
    final ExporterRepository exporterRepository = new ExporterRepository();
    final var exporterEntries = cfg.getExporters().entrySet();
    // load and validate exporters
    for (final var exporterEntry : exporterEntries) {
        final var id = exporterEntry.getKey();
        final var exporterCfg = exporterEntry.getValue();
        try {
            exporterRepository.load(id, exporterCfg);
        } catch (final ExporterLoadException | ExternalJarLoadException e) {
            throw new IllegalStateException("Failed to load exporter with configuration: " + exporterCfg, e);
        }
    }
    return exporterRepository;
}
Also used : ExporterLoadException(io.camunda.zeebe.broker.exporter.repo.ExporterLoadException) ExporterRepository(io.camunda.zeebe.broker.exporter.repo.ExporterRepository) ExternalJarLoadException(io.camunda.zeebe.util.jar.ExternalJarLoadException)

Example 2 with ExporterLoadException

use of io.camunda.zeebe.broker.exporter.repo.ExporterLoadException in project zeebe by camunda-cloud.

the class Broker method buildExporterRepository.

private ExporterRepository buildExporterRepository(final BrokerCfg cfg) {
    final ExporterRepository exporterRepository = new ExporterRepository();
    final var exporterEntries = cfg.getExporters().entrySet();
    // load and validate exporters
    for (final var exporterEntry : exporterEntries) {
        final var id = exporterEntry.getKey();
        final var exporterCfg = exporterEntry.getValue();
        try {
            exporterRepository.load(id, exporterCfg);
        } catch (final ExporterLoadException | ExternalJarLoadException e) {
            throw new IllegalStateException("Failed to load exporter with configuration: " + exporterCfg, e);
        }
    }
    return exporterRepository;
}
Also used : ExporterLoadException(io.camunda.zeebe.broker.exporter.repo.ExporterLoadException) ExporterRepository(io.camunda.zeebe.broker.exporter.repo.ExporterRepository) ExternalJarLoadException(io.camunda.zeebe.util.jar.ExternalJarLoadException)

Example 3 with ExporterLoadException

use of io.camunda.zeebe.broker.exporter.repo.ExporterLoadException in project zeebe by camunda.

the class Broker method buildExporterRepository.

private ExporterRepository buildExporterRepository(final BrokerCfg cfg) {
    final ExporterRepository exporterRepository = new ExporterRepository();
    final var exporterEntries = cfg.getExporters().entrySet();
    // load and validate exporters
    for (final var exporterEntry : exporterEntries) {
        final var id = exporterEntry.getKey();
        final var exporterCfg = exporterEntry.getValue();
        try {
            exporterRepository.load(id, exporterCfg);
        } catch (final ExporterLoadException | ExternalJarLoadException e) {
            throw new IllegalStateException("Failed to load exporter with configuration: " + exporterCfg, e);
        }
    }
    return exporterRepository;
}
Also used : ExporterLoadException(io.camunda.zeebe.broker.exporter.repo.ExporterLoadException) ExporterRepository(io.camunda.zeebe.broker.exporter.repo.ExporterRepository) ExternalJarLoadException(io.camunda.zeebe.util.jar.ExternalJarLoadException)

Aggregations

ExporterLoadException (io.camunda.zeebe.broker.exporter.repo.ExporterLoadException)3 ExporterRepository (io.camunda.zeebe.broker.exporter.repo.ExporterRepository)3 ExternalJarLoadException (io.camunda.zeebe.util.jar.ExternalJarLoadException)3