Package io.sentry.transport
Class AsyncHttpTransport
- java.lang.Object
-
- io.sentry.transport.AsyncHttpTransport
-
- All Implemented Interfaces:
ITransport,java.io.Closeable,java.lang.AutoCloseable
public final class AsyncHttpTransport extends java.lang.Object implements ITransport
ITransportimplementation that executes request asynchronously in a blocking manner usingHttpURLConnection.
-
-
Constructor Summary
Constructors Constructor Description AsyncHttpTransport(@NotNull SentryOptions options, @NotNull RateLimiter rateLimiter, @NotNull ITransportGate transportGate, @NotNull RequestDetails requestDetails)AsyncHttpTransport(@NotNull io.sentry.transport.QueuedThreadPoolExecutor executor, @NotNull SentryOptions options, @NotNull RateLimiter rateLimiter, @NotNull ITransportGate transportGate, @NotNull io.sentry.transport.HttpConnection httpConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush(long timeoutMillis)Flushes events queued up, but keeps the client enabled.voidsend(@NotNull SentryEnvelope envelope, @Nullable java.util.Map<java.lang.String,java.lang.Object> hint)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.sentry.transport.ITransport
send
-
-
-
-
Constructor Detail
-
AsyncHttpTransport
public AsyncHttpTransport(@NotNull @NotNull SentryOptions options, @NotNull @NotNull RateLimiter rateLimiter, @NotNull @NotNull ITransportGate transportGate, @NotNull @NotNull RequestDetails requestDetails)
-
AsyncHttpTransport
public AsyncHttpTransport(@NotNull @NotNull io.sentry.transport.QueuedThreadPoolExecutor executor, @NotNull @NotNull SentryOptions options, @NotNull @NotNull RateLimiter rateLimiter, @NotNull @NotNull ITransportGate transportGate, @NotNull @NotNull io.sentry.transport.HttpConnection httpConnection)
-
-
Method Detail
-
send
public void send(@NotNull @NotNull SentryEnvelope envelope, @Nullable @Nullable java.util.Map<java.lang.String,java.lang.Object> hint) throws java.io.IOException- Specified by:
sendin interfaceITransport- Throws:
java.io.IOException
-
flush
public void flush(long timeoutMillis)
Description copied from interface:ITransportFlushes events queued up, but keeps the client enabled. Not implemented yet.- Specified by:
flushin interfaceITransport- Parameters:
timeoutMillis- time in milliseconds
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-