@ApiStatus.NonExtendable @ApiStatus.Internal public class HttpTransport extends java.lang.Object implements ITransport
ITransport interface that sends the events to the Sentry server
over HTTP(S).| Constructor and Description |
|---|
HttpTransport(@NotNull SentryOptions options,
@NotNull IConnectionConfigurator connectionConfigurator,
int connectionTimeoutMillis,
int readTimeoutMillis,
boolean bypassSecurity,
@NotNull java.net.URL sentryUrl)
Constructs a new HTTP transport instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isRetryAfter(@NotNull java.lang.String itemType)
Check if an itemType is retry after or not
|
protected @NotNull java.net.HttpURLConnection |
open() |
@NotNull TransportResult |
send(@NotNull SentryEnvelope envelope) |
public HttpTransport(@NotNull
@NotNull SentryOptions options,
@NotNull
@NotNull IConnectionConfigurator connectionConfigurator,
int connectionTimeoutMillis,
int readTimeoutMillis,
boolean bypassSecurity,
@NotNull
@NotNull java.net.URL sentryUrl)
requestUpdater must set
the appropriate content encoding header for the ISerializer instance
obtained from the options.options - sentry options to read the config fromconnectionConfigurator - this consumer is given a chance to set up the request before it
is sentconnectionTimeoutMillis - connection timeout in millisecondsreadTimeoutMillis - read timeout in millisecondsbypassSecurity - whether to ignore TLS errorssentryUrl - sentryUrl which is the parsed DSN@NotNull
protected @NotNull java.net.HttpURLConnection open()
throws java.io.IOException
java.io.IOExceptionpublic boolean isRetryAfter(@NotNull
@NotNull java.lang.String itemType)
isRetryAfter in interface ITransportitemType - the itemType (eg event, session, etc...)@NotNull public @NotNull TransportResult send(@NotNull @NotNull SentryEnvelope envelope) throws java.io.IOException
send in interface ITransportjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException