Interface ITransport

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
ApacheHttpClientTransport, AsyncHttpTransport, NoOpTransport, StdoutTransport

public interface ITransport extends Closeable
A transport is in charge of sending the event to the Sentry server.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(boolean isRestarting)
    Closes the transport.
    void
    flush(long timeoutMillis)
    Flushes events queued up, but keeps the client enabled.
    @Nullable RateLimiter
     
    default boolean
     
    default void
    send(@NotNull SentryEnvelope envelope)
     
    void
    send(@NotNull SentryEnvelope envelope, @NotNull Hint hint)
     

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • send

      void send(@NotNull @NotNull SentryEnvelope envelope, @NotNull @NotNull Hint hint) throws IOException
      Throws:
      IOException
    • send

      default void send(@NotNull @NotNull SentryEnvelope envelope) throws IOException
      Throws:
      IOException
    • isHealthy

      default boolean isHealthy()
    • flush

      void flush(long timeoutMillis)
      Flushes events queued up, but keeps the client enabled. Not implemented yet.
      Parameters:
      timeoutMillis - time in milliseconds
    • getRateLimiter

      @Nullable @Nullable RateLimiter getRateLimiter()
    • close

      void close(boolean isRestarting) throws IOException
      Closes the transport.
      Parameters:
      isRestarting - if true, avoids locking the main thread by dropping the current connection.
      Throws:
      IOException