public class AutoReturnableObject<T> extends Object implements Closeable
GenericObjectPool and returns it automatically on close. Useful for try with resource.| Constructor and Description |
|---|
AutoReturnableObject(org.apache.commons.pool2.impl.GenericObjectPool<T> pool) |
public AutoReturnableObject(org.apache.commons.pool2.impl.GenericObjectPool<T> pool) throws IOException
IOExceptionpublic T get() throws IOException
GenericObjectPool.IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOException