Package com.dtolabs.rundeck.core.plugins
Interface CloseableProvider<T>
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
public interface CloseableProvider<T> extends java.io.Closeable
A Loaded plugin provider which can be closed when no longer needed- Since:
- 3/8/17
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <X> CloseableProvider<X>
convert(java.util.function.Function<T,X> converter)
Convert a closeable provider of one type to a closeable of another type given a conversion function.T
getProvider()
-
-
-
Method Detail
-
getProvider
T getProvider()
- Returns:
- the provided instance
-
convert
default <X> CloseableProvider<X> convert(java.util.function.Function<T,X> converter)
Convert a closeable provider of one type to a closeable of another type given a conversion function. The returned closeable will manage closing this original closeable as well as the converted object if it is also closeable.- Parameters:
converter
- converter function
-
-