public class ConfigBuilder
extends java.lang.Object
configuration of the rollbar
notifier.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
accessToken |
protected java.util.List<java.lang.String> |
appPackages |
protected Provider<com.rollbar.api.payload.data.Client> |
client |
protected java.lang.String |
codeVersion |
protected Provider<java.lang.String> |
context |
protected Provider<java.util.Map<java.lang.String,java.lang.Object>> |
custom |
protected DefaultLevels |
defaultLevels |
protected boolean |
enabled |
protected java.lang.String |
endpoint |
protected java.lang.String |
environment |
protected Filter |
filter |
protected FingerprintGenerator |
fingerPrintGenerator |
protected java.lang.String |
framework |
protected boolean |
handleUncaughtErrors |
protected JsonSerializer |
jsonSerializer |
protected java.lang.String |
language |
protected Provider<com.rollbar.api.payload.data.Notifier> |
notifier |
protected Provider<com.rollbar.api.payload.data.Person> |
person |
protected java.lang.String |
platform |
protected java.net.Proxy |
proxy |
protected Provider<com.rollbar.api.payload.data.Request> |
request |
protected Sender |
sender |
protected Provider<com.rollbar.api.payload.data.Server> |
server |
protected Provider<java.lang.Long> |
timestamp |
protected Transformer |
transformer |
protected boolean |
truncateLargePayloads |
protected UuidGenerator |
uuidGenerator |
| Modifier | Constructor and Description |
|---|---|
protected |
ConfigBuilder(java.lang.String accessToken)
Constructor with an access token.
|
| Modifier and Type | Method and Description |
|---|---|
ConfigBuilder |
accessToken(java.lang.String accessToken)
The access token to use.
|
ConfigBuilder |
appPackages(java.util.List<java.lang.String> appPackages)
The list of packages to be considered in your app.
|
Config |
build()
Builds the
config. |
ConfigBuilder |
client(Provider<com.rollbar.api.payload.data.Client> client)
The provider to retrieve the
client. |
ConfigBuilder |
codeVersion(java.lang.String codeVersion)
The currently running version of the code.
|
ConfigBuilder |
context(Provider<java.lang.String> context)
The provider to retrieve the context.
|
ConfigBuilder |
custom(Provider<java.util.Map<java.lang.String,java.lang.Object>> custom)
The provider to retrieve the custom.
|
ConfigBuilder |
defaultErrorLevel(com.rollbar.api.payload.data.Level level)
Level to use as the default for Errors if one is not otherwise specified.
|
ConfigBuilder |
defaultMessageLevel(com.rollbar.api.payload.data.Level level)
Level to use as the default for messages if one is not otherwise specified.
|
ConfigBuilder |
defaultThrowableLevel(com.rollbar.api.payload.data.Level level)
Level to use as the default for non-Error Throwables if one is not otherwise specified.
|
ConfigBuilder |
enabled(boolean enabled)
Flag to indicate that the Rollbar notifier should enabled/disabled.
|
ConfigBuilder |
endpoint(java.lang.String endpoint)
The Rollbar endpoint to use.
|
ConfigBuilder |
environment(java.lang.String environment)
Represents the current environment (e.g.: production, debug, test).
|
ConfigBuilder |
filter(Filter filter)
The provider to retrieve the
filter. |
ConfigBuilder |
fingerPrintGenerator(FingerprintGenerator fingerPrintGenerator)
The provider to retrieve the
fingerprint generator. |
ConfigBuilder |
framework(java.lang.String framework)
The framework being run (e.g.
|
ConfigBuilder |
handleUncaughtErrors(boolean handleUncaughtErrors)
Flag to set the default handler for uncaught errors,
see
Thread.UncaughtExceptionHandler. |
ConfigBuilder |
jsonSerializer(JsonSerializer jsonSerializer)
The JsonSerializer to use with the default Sender if no other
sender is specified.
|
ConfigBuilder |
language(java.lang.String language)
The language running (most likely java, but any JVM language might be here).
|
ConfigBuilder |
notifier(Provider<com.rollbar.api.payload.data.Notifier> notifier)
The provider to retrieve the
notifier. |
ConfigBuilder |
person(Provider<com.rollbar.api.payload.data.Person> person)
The provider to retrieve the
person. |
ConfigBuilder |
platform(java.lang.String platform)
The platform running (most likely JVM and a version).
|
ConfigBuilder |
proxy(java.net.Proxy proxy)
The
proxy to be used to send the data. |
ConfigBuilder |
request(Provider<com.rollbar.api.payload.data.Request> request)
The provider to retrieve the
request. |
ConfigBuilder |
sender(Sender sender)
The
sender. |
ConfigBuilder |
server(Provider<com.rollbar.api.payload.data.Server> server)
The provider to retrieve the
server. |
ConfigBuilder |
timestamp(Provider<java.lang.Long> timestamp)
The provider to retrieve the timestamp.
|
ConfigBuilder |
transformer(Transformer transformer)
The provider to retrieve the
transformer. |
ConfigBuilder |
truncateLargePayloads(boolean truncate)
If set to true, the notifier will attempt to truncate payloads that are larger than the
maximum size Rollbar allows.
|
ConfigBuilder |
uuidGenerator(UuidGenerator uuidGenerator)
The provider to retrieve the
uuid generator. |
static ConfigBuilder |
withAccessToken(java.lang.String accessToken)
Initializes a config builder instance with the access token supplied.
|
static ConfigBuilder |
withConfig(Config config)
Initializes a config builder instance with the values set in the supplied config.
|
protected java.lang.String accessToken
protected java.lang.String endpoint
protected java.lang.String environment
protected java.lang.String codeVersion
protected java.lang.String platform
protected java.lang.String language
protected java.lang.String framework
protected Provider<java.lang.String> context
protected Provider<com.rollbar.api.payload.data.Request> request
protected Provider<com.rollbar.api.payload.data.Person> person
protected Provider<com.rollbar.api.payload.data.Server> server
protected Provider<com.rollbar.api.payload.data.Client> client
protected Provider<java.util.Map<java.lang.String,java.lang.Object>> custom
protected Provider<com.rollbar.api.payload.data.Notifier> notifier
protected Provider<java.lang.Long> timestamp
protected Filter filter
protected Transformer transformer
protected FingerprintGenerator fingerPrintGenerator
protected UuidGenerator uuidGenerator
protected Sender sender
protected JsonSerializer jsonSerializer
protected java.net.Proxy proxy
protected java.util.List<java.lang.String> appPackages
protected boolean handleUncaughtErrors
protected boolean enabled
protected final DefaultLevels defaultLevels
protected boolean truncateLargePayloads
protected ConfigBuilder(java.lang.String accessToken)
public static ConfigBuilder withAccessToken(java.lang.String accessToken)
accessToken - the access token.public static ConfigBuilder withConfig(Config config)
config - an object conforming to the Config interface.public ConfigBuilder accessToken(java.lang.String accessToken)
accessToken - the access token.public ConfigBuilder endpoint(java.lang.String endpoint)
endpoint - the Rollbar endpoint url.public ConfigBuilder environment(java.lang.String environment)
environment - the environment.public ConfigBuilder codeVersion(java.lang.String codeVersion)
codeVersion - the code version.public ConfigBuilder platform(java.lang.String platform)
platform - the platform.public ConfigBuilder language(java.lang.String language)
language - the language.public ConfigBuilder framework(java.lang.String framework)
framework - the framework.public ConfigBuilder context(Provider<java.lang.String> context)
context - the context provider.public ConfigBuilder request(Provider<com.rollbar.api.payload.data.Request> request)
request.request - the request provider.public ConfigBuilder person(Provider<com.rollbar.api.payload.data.Person> person)
person.person - the person provider.public ConfigBuilder server(Provider<com.rollbar.api.payload.data.Server> server)
server.server - the server provider.public ConfigBuilder client(Provider<com.rollbar.api.payload.data.Client> client)
client.client - the client provider.public ConfigBuilder custom(Provider<java.util.Map<java.lang.String,java.lang.Object>> custom)
custom - the custom provider.public ConfigBuilder notifier(Provider<com.rollbar.api.payload.data.Notifier> notifier)
notifier.notifier - the notifier provider.public ConfigBuilder timestamp(Provider<java.lang.Long> timestamp)
timestamp - the timestamp.public ConfigBuilder filter(Filter filter)
filter.filter - the filter provider.public ConfigBuilder transformer(Transformer transformer)
transformer.transformer - the transformer provider.public ConfigBuilder fingerPrintGenerator(FingerprintGenerator fingerPrintGenerator)
fingerprint generator.fingerPrintGenerator - the fingerprint generator provider.public ConfigBuilder uuidGenerator(UuidGenerator uuidGenerator)
uuid generator.uuidGenerator - the uuid generator provider.public ConfigBuilder sender(Sender sender)
sender.sender - the sender.public ConfigBuilder jsonSerializer(JsonSerializer jsonSerializer)
jsonSerializer - the json serializer.public ConfigBuilder proxy(java.net.Proxy proxy)
proxy to be used to send the data.proxy - the proxy.public ConfigBuilder appPackages(java.util.List<java.lang.String> appPackages)
appPackages - the list of packages.public ConfigBuilder handleUncaughtErrors(boolean handleUncaughtErrors)
Thread.UncaughtExceptionHandler.handleUncaughtErrors - true to handle uncaught errors otherwise false.public ConfigBuilder enabled(boolean enabled)
enabled - true to enable the notifier.public ConfigBuilder defaultMessageLevel(com.rollbar.api.payload.data.Level level)
level - the level.public ConfigBuilder defaultErrorLevel(com.rollbar.api.payload.data.Level level)
level - the level.public ConfigBuilder defaultThrowableLevel(com.rollbar.api.payload.data.Level level)
level - the level.public ConfigBuilder truncateLargePayloads(boolean truncate)
If set to true, the notifier will attempt to truncate payloads that are larger than the maximum size Rollbar allows. Default: false.
truncate - true to enable truncation.