
T - the type that is passed to the close handlerpublic interface HandleableCloseable<T>
extends java.io.Closeable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
HandleableCloseable.Key
A key which may be used to remove this handler.
|
| Modifier and Type | Method and Description |
|---|---|
HandleableCloseable.Key |
addCloseHandler(CloseHandler<? super T> handler)
Add a handler that will be called upon close.
|
void |
awaitClosed()
Wait for a resource close to complete.
|
void |
awaitClosedUninterruptibly()
Wait for a resource close to complete.
|
void |
close()
Close this resource.
|
void |
closeAsync()
Asynchronously close this resource.
|
void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOException - if the close failedvoid awaitClosed()
throws java.lang.InterruptedException
java.lang.InterruptedException - if the operation is interruptedvoid awaitClosedUninterruptibly()
void closeAsync()
HandleableCloseable.Key addCloseHandler(CloseHandler<? super T> handler)
handler - the close handlerCopyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.