Interface DisposableSupplier<T>

Type Parameters:
T - type which is created by DisposableSupplier.
All Superinterfaces:
Supplier<T>
All Known Implementing Classes:
AbstractCdiBeanSupplier, GenericCdiBeanSupplier, RequestScopedCdiBeanSupplier

public interface DisposableSupplier<T> extends Supplier<T>
Supplier extension which is able to call Supplier.get() method to create a new object and also call dispose(Object) to make some cleaning code regarding the instance and the specific Supplier instance.
Author:
Petr Bouda
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dispose(T instance)
    This method will dispose the provided object created by this Supplier.

    Methods inherited from interface java.util.function.Supplier

    get
  • Method Details

    • dispose

      void dispose(T instance)
      This method will dispose the provided object created by this Supplier.
      Parameters:
      instance - the instance to be disposed.