All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rollbar.notifier.provider.notifier.NotifierProvider Maven / Gradle / Ivy

Go to download

For connecting your applications built on the JVM to Rollbar for Error Reporting

There is a newer version: 2.0.0-alpha.1
Show newest version
package com.rollbar.notifier.provider.notifier;

import com.rollbar.api.payload.data.Notifier;
import com.rollbar.notifier.provider.Provider;

/**
 * Default implementation to provide the {@link Notifier}.
 */
public class NotifierProvider implements Provider {

  private final Notifier notifier;

  public NotifierProvider() {
    this(new VersionHelper());
  }

  NotifierProvider(VersionHelper versionHelper) {
    String version = versionHelper.version();

    this.notifier = new Notifier.Builder()
        .name("rollbar-java")
        .version(version)
        .build();
  }

  @Override
  public Notifier provide() {
    return notifier;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy