public abstract class CloseableInvoker extends Object implements Closeable
Closeable
with an additional hook for
executing code at closing. Classes that extend CloseableInvoker need to override release()
instead of close()
which is final to avoid accidental overriding.Constructor and Description |
---|
CloseableInvoker() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract void |
release() |
void |
teardown(Runnable teardown) |
protected abstract void release()
public void teardown(Runnable teardown)
public final void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2018. All rights reserved.