Interface UncheckedCloseable

  • All Superinterfaces:
    AutoCloseable
    All Known Subinterfaces:
    Counter, Meter, Timer

    public interface UncheckedCloseable
    extends AutoCloseable
    Something which can be close()'d.

    Extends AutoCloseable but the close() here does not throw any Exception.

    Used e.g. by APIs of OSGi bundles which return objects that must be closed either when such objects are no longer required, or when unloading the bundle; typically e.g. in Blueprint beans' @PreDestroy methods. The infrautils metrics are an example of such objects.

    Author:
    Michael Vorburger.ch