Package io.sentry

Class ShutdownHookIntegration

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

    public final class ShutdownHookIntegration
    extends java.lang.Object
    implements Integration, java.io.Closeable
    Registers hook that flushes Hub when main thread shuts down.
    • Constructor Detail

      • ShutdownHookIntegration

        @TestOnly
        public ShutdownHookIntegration​(@NotNull
                                       @NotNull java.lang.Runtime runtime)
      • ShutdownHookIntegration

        public ShutdownHookIntegration()
    • Method Detail

      • register

        public void register​(@NotNull
                             @NotNull IHub hub,
                             @NotNull
                             @NotNull SentryOptions options)
        Description copied from interface: Integration
        Registers an integration
        Specified by:
        register in interface Integration
        Parameters:
        hub - the Hub
        options - the options
      • 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