Class AsyncHttpTransport

  • All Implemented Interfaces:
    ITransport, java.io.Closeable, java.lang.AutoCloseable

    public final class AsyncHttpTransport
    extends java.lang.Object
    implements ITransport
    ITransport implementation that executes request asynchronously in a blocking manner using HttpURLConnection.
    • Constructor Detail

      • 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.lang.Object hint)
                  throws java.io.IOException
        Specified by:
        send in interface ITransport
        Throws:
        java.io.IOException
      • flush

        public void flush​(long timeoutMillis)
        Description copied from interface: ITransport
        Flushes events queued up, but keeps the client enabled. Not implemented yet.
        Specified by:
        flush in interface ITransport
        Parameters:
        timeoutMillis - time in milliseconds
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException