org.crsh.util
Class CloseableList

java.lang.Object
  extended by org.crsh.util.CloseableList
All Implemented Interfaces:
Closeable

public final class CloseableList
extends Object
implements Closeable


Field Summary
private  ArrayList<Closeable> closeables
          .
private  AtomicBoolean closed
          .
(package private)  Logger log
          .
 
Constructor Summary
CloseableList()
           
 
Method Summary
 void add(Closeable closeable)
          Add a closeable to the list.
 void close()
           
 boolean isClosed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

final Logger log
.


closeables

private final ArrayList<Closeable> closeables
.


closed

private final AtomicBoolean closed
.

Constructor Detail

CloseableList

public CloseableList()
Method Detail

isClosed

public boolean isClosed()

add

public void add(Closeable closeable)
         throws IllegalStateException,
                NullPointerException
Add a closeable to the list.

Parameters:
closeable - the closeable to add
Throws:
IllegalStateException - if the list is already closed
NullPointerException - if the argument is null

close

public void close()
Specified by:
close in interface Closeable


Copyright © 2014 eXo Platform SAS. All Rights Reserved.