com.rollbar.notifier.provider.notifier.NotifierProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rollbar-java Show documentation
Show all versions of rollbar-java Show documentation
For connecting your applications built on the JVM to Rollbar for Error Reporting
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;
}
}