Interface DisposableSupplier<T>
-
- Type Parameters:
T- type which is created byDisposableSupplier.
- All Superinterfaces:
java.util.function.Supplier<T>
- All Known Implementing Classes:
ExecutorProviders.ExecutorServiceSupplier,ExecutorProviders.ScheduledExecutorServiceSupplier
public interface DisposableSupplier<T> extends java.util.function.Supplier<T>Supplier extension which is able to callSupplier.get()method to create a new object and also calldispose(Object)to make some cleaning code regarding the instance and the specificSupplierinstance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose(T instance)This method will dispose the provided object created by thisSupplier.
-
-
-
Method Detail
-
dispose
void dispose(T instance)
This method will dispose the provided object created by thisSupplier.- Parameters:
instance- the instance to be disposed.
-
-