Package io.sentry.transport
Class TransportResult
java.lang.Object
io.sentry.transport.TransportResult
A result of
ITransport.send(io.sentry.SentryEnvelope)
. Note that this class is
intentionally not subclassable and has only two factory methods to capture the 2 possible states
- success or error.-
Method Summary
Modifier and TypeMethodDescriptionstatic @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
abstract boolean
static @NotNull TransportResult
success()
Use this method to announce success of sending the event.
-
Method Details
-
success
Use this method to announce success of sending the event.- Returns:
- a successful transport result
-
error
Use this method to announce failure of sending the event.- Parameters:
responseCode
- the HTTP status code if known, -1 otherwise- Returns:
- an erroneous transport result
-
error
Use this method to announce failure of sending the event. Defaults responseCode to -1 (unknown responseCode)- Returns:
- an erroneous transport result
-
isSuccess
public abstract boolean isSuccess() -
getResponseCode
public abstract int getResponseCode()
-