|
XNIO version 1.2.1.GA | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.xnio.WeakCloseable
public final class WeakCloseable
A Closeable
that holds a weak reference to another Closeable
, which can be used to close the other
without creating a strong reference to it.
Constructor Summary | |
---|---|
WeakCloseable(Closeable resource)
Construct a new instance. |
|
WeakCloseable(WeakReference<Closeable> resource)
Construct a new instance. |
Method Summary | |
---|---|
void |
close()
Closes this resource and releases any system resources associated with it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WeakCloseable(WeakReference<Closeable> resource)
resource
- the target resourcepublic WeakCloseable(Closeable resource)
resource
- the target resourceMethod Detail |
---|
public void close() throws IOException
close
in interface Closeable
IOException
|
XNIO version 1.2.1.GA | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |