Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.rollbar;
import com.rollbar.api.payload.data.*;
import com.rollbar.notifier.config.ConfigBuilder;
import com.rollbar.notifier.filter.Filter;
import com.rollbar.notifier.provider.Provider;
import com.rollbar.notifier.sender.BufferedSender;
import com.rollbar.notifier.sender.Sender;
import com.rollbar.notifier.sender.listener.SenderListener;
import com.rollbar.notifier.transformer.Transformer;
import java.util.Map;
/**
* This class is deprecated and provided as a convenience to ease the migration path
* from 0.5.4 to 1.0.0. For the simplest use cases, this class should provide the same
* functionality as the old com.rollbar.Rollbar class by delegating to the new
* com.rollbar.notifier.Rollbar class. For any new usage, do not use this class, prefer
* com.rollbar.notifier.Rollbar.
*/
@Deprecated
public class Rollbar {
private final com.rollbar.notifier.Rollbar rollbar;
/**
* Construct a notifier defaults for everything including Sender.
* Caution: default sender is slow and blocking. Consider providing a Sender overload.
* @param accessToken not nullable, the access token to send payloads to
* @param environment not nullable, the environment to send payloads under
*/
public Rollbar(String accessToken, String environment) {
this(accessToken, environment, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
}
/**
* Construct notifier, defaults for everything but Sender.
* @param accessToken not nullable, the access token to send payloads to
* @param environment not nullable, the environment to send payloads under
* @param sender the sender to use. If null uses default: {@link Sender}
*/
public Rollbar(String accessToken, String environment, Sender sender) {
this(accessToken, environment, sender, null, null, null, null, null, null, null, null, null, null, null, null, null);
}
/**
* Construct notifier with static values for all configuration options set. Anything left null will use the default
* value. If appropriate.
* @param accessToken not nullable, the access token to send payloads to
* @param environment not nullable, the environment to send payloads under
* @param sender the sender to use. If null uses default: {@link Sender}
* @param codeVersion the version of the code currently running. If code checked out on server: `git rev-parse HEAD`
* @param platform the platform you're running. (JVM version, or similar).
* @param language the main language you're running ("java" by default, override w/ "clojure", "scala" etc.).
* @param framework the framework you're using ("Play", "Spring", etc.).
* @param context a mnemonic for finding the code responsible (e.g. controller name, module name)
* @param request the HTTP request that triggered this error. Can be set if the IOC container can work per-request.
* @param person the affected person. Can be set if the IOC container can work per-request.
* @param server info about this server. This can be statically set.
* @param custom custom info to send with *every* error. Can be dynamically or statically set.
* @param notifier information about this notifier. Default {@code new Notifier()} ({@link Notifier}.
* @param responseHandler what to do with the response. Use this to check for failures and handle some other way.
* @param filter filter used to determine if you will send payload. Receives *transformed* payload.
* @param transform alter payload before sending.
*/
public Rollbar(String accessToken, String environment, Sender sender, String codeVersion, String platform,
String language, String framework, final String context, final Request request, final Person person, final Server server,
final Map custom, final Notifier notifier, SenderListener responseHandler,
Filter filter, Transformer transform) {
sender = sender != null ? sender : new BufferedSender.Builder().build();
if (responseHandler != null) {
sender.addListener(responseHandler);
}
this.rollbar = new com.rollbar.notifier.Rollbar(ConfigBuilder.withAccessToken(accessToken)
.environment(environment)
.sender(sender)
.codeVersion(codeVersion)
.platform(platform)
.language(language)
.framework(framework)
.context(context != null ? new Provider() {
@Override
public String provide() {
return context;
}
} : null)
.request(request != null ? new Provider() {
@Override
public Request provide() {
return request;
}
} : null)
.person(person != null ? new Provider() {
@Override
public Person provide() {
return person;
}
} : null)
.server(server != null ? new Provider() {
@Override
public Server provide() {
return server;
}
} : null)
.custom(custom != null ? new Provider