I have a "connection pool handler" which in its class has a array list of "Connection Handlers" I was wondering whether it is possible to have the "Connection Handlers" remove themselves from said list when they close the connections themselves and if so how?
public class ConnectionHandlerPool
{
private static final ArrayList<ConnectionThread> POOL = new ArrayList<ConnectionThread>;
<code to get stuff out of pool>
Connection thread class
public class ConnectionHandlerThread
{
<stuff that creates the connection>
<stuff that if exceptions occur i.e. a stream or socket closes it needs to close all the connections and remove from pool>
<that way of removing it from arraylist in the class above it>