public abstract class TransportResult
extends java.lang.Object
ITransport.send(io.sentry.core.SentryEnvelope). Note that this class is
intentionally not subclassable and has only two factory methods to capture the 2 possible states
- success or error.| Modifier and Type | Method and Description |
|---|---|
static @NotNull TransportResult |
error()
Use this method to announce failure of sending the event.
|
static @NotNull TransportResult |
error(int responseCode)
Use this method to announce failure of sending the event.
|
abstract int |
getResponseCode() |
abstract boolean |
isSuccess() |
static @NotNull TransportResult |
success()
Use this method to announce success of sending the event.
|
@NotNull public static @NotNull TransportResult success()
@NotNull public static @NotNull TransportResult error(int responseCode)
responseCode - the HTTP status code if known, -1 otherwise@NotNull public static @NotNull TransportResult error()
public abstract boolean isSuccess()
public abstract int getResponseCode()