RESULT - The result type of a send operation. Sync methods can use VoidC - The configuration class for the notifier@Unstable
public abstract class RollbarBase<RESULT,C extends CommonConfig>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected BodyFactory |
bodyFactory |
protected C |
config |
protected java.util.concurrent.locks.Lock |
configReadLock |
protected java.util.concurrent.locks.ReadWriteLock |
configReadWriteLock |
protected java.util.concurrent.locks.Lock |
configWriteLock |
protected PayloadTruncator |
payloadTruncator |
| Modifier | Constructor and Description |
|---|---|
protected |
RollbarBase(C config,
BodyFactory bodyFactory,
RESULT emptyResult) |
| Modifier and Type | Method and Description |
|---|---|
protected com.rollbar.api.payload.data.Data |
buildData(CommonConfig config,
ThrowableWrapper error,
java.util.Map<java.lang.String,java.lang.Object> custom,
java.lang.String description,
com.rollbar.api.payload.data.Level level,
boolean isUncaught) |
protected void |
configure(C config)
Replace the configuration of this instance directly.
|
protected com.rollbar.api.payload.data.Level |
level(CommonConfig config,
java.lang.Throwable error)
Get the level of the error or message.
|
protected RESULT |
process(ThrowableWrapper error,
java.util.Map<java.lang.String,java.lang.Object> custom,
java.lang.String description,
com.rollbar.api.payload.data.Level level,
boolean isUncaught) |
protected void |
processAppPackages(CommonConfig config) |
void |
recordLogEventFor(com.rollbar.api.payload.data.Level level,
java.lang.String message)
Record log telemetry event.
|
void |
recordManualEventFor(com.rollbar.api.payload.data.Level level,
java.lang.String message)
Record manual telemetry event.
|
void |
recordNavigationEventFor(com.rollbar.api.payload.data.Level level,
java.lang.String from,
java.lang.String to)
Record navigation telemetry event with from (origin) and to (destination).
|
void |
recordNetworkEventFor(com.rollbar.api.payload.data.Level level,
java.lang.String method,
java.lang.String url,
java.lang.String statusCode)
Record network telemetry event with method, url, and status code.
|
protected abstract RESULT |
sendPayload(C config,
com.rollbar.api.payload.Payload payload) |
protected RollbarThrowableWrapper |
wrapThrowable(java.lang.Throwable error) |
protected BodyFactory bodyFactory
protected PayloadTruncator payloadTruncator
protected C extends CommonConfig config
protected final java.util.concurrent.locks.ReadWriteLock configReadWriteLock
protected final java.util.concurrent.locks.Lock configReadLock
protected final java.util.concurrent.locks.Lock configWriteLock
protected RollbarBase(C config, BodyFactory bodyFactory, RESULT emptyResult)
public void recordLogEventFor(com.rollbar.api.payload.data.Level level,
java.lang.String message)
TelemetryType.LOG).level - the TelemetryEvent severity (e.g. Level.DEBUG).message - the message sent for this event (e.g. "hello world").public void recordManualEventFor(com.rollbar.api.payload.data.Level level,
java.lang.String message)
TelemetryType.MANUAL)level - the TelemetryEvent severity (e.g. Level.DEBUG).message - the message sent for this event (e.g. "hello world").public void recordNavigationEventFor(com.rollbar.api.payload.data.Level level,
java.lang.String from,
java.lang.String to)
TelemetryType.NAVIGATION).level - the TelemetryEvent severity (e.g. Level.DEBUG).from - the starting point (e.g. "SettingView").to - the destination point (e.g. "HomeView").public void recordNetworkEventFor(com.rollbar.api.payload.data.Level level,
java.lang.String method,
java.lang.String url,
java.lang.String statusCode)
TelemetryType.NETWORK).level - the TelemetryEvent severity (e.g. Level.DEBUG).method - the verb used (e.g. "POST").url - the api url (e.g. "
http://rollbar.com/test/api").statusCode - the response status code (e.g. "404").protected void configure(C config)
config - the new configuration.protected void processAppPackages(CommonConfig config)
protected com.rollbar.api.payload.data.Level level(CommonConfig config, java.lang.Throwable error)
config - the current Config.error - the error.protected com.rollbar.api.payload.data.Data buildData(CommonConfig config, ThrowableWrapper error, java.util.Map<java.lang.String,java.lang.Object> custom, java.lang.String description, com.rollbar.api.payload.data.Level level, boolean isUncaught)
protected RESULT process(ThrowableWrapper error, java.util.Map<java.lang.String,java.lang.Object> custom, java.lang.String description, com.rollbar.api.payload.data.Level level, boolean isUncaught)
protected RollbarThrowableWrapper wrapThrowable(java.lang.Throwable error)