public interface CloseableWithNotification extends Closeable
CloseableWithNotification interface extends the 
 Closeable interface to define the contract for an object that
 can notify registered listeners about its closing state.| Modifier and Type | Method and Description | 
|---|---|
void | 
addCloseListener(CloseListener listener)
Adds the given listener to this  
Closeable object, such that it
 will be notified when this object either is about to be, or just has been,
 closed. | 
void | 
removeCloseListener(CloseListener listener)
Removes the given listener from this  
Closeable object, such
 that it will no longer be notified when this object either is about to be,
 or just has been, closed. | 
void addCloseListener(CloseListener listener)
Closeable object, such that it
 will be notified when this object either is about to be, or just has been,
 closed.  If the given listener has already been added to this object, then
 this method has no effect.listener - the listenervoid removeCloseListener(CloseListener listener)
Closeable object, such
 that it will no longer be notified when this object either is about to be,
 or just has been, closed.  If the given listener has never been added to 
 this object, then this method has no effect.listener - the listener