protected ConnectionListener removeConnectionListener ( boolean free , Collection < ConnectionListener > listeners ) { if ( free ) { for ( ConnectionListener cl : listeners ) { if ( cl . changeState ( FREE , IN_USE ) ) return cl ; } } else { for ( ConnectionListener cl : listeners ) { if ( cl . getState ( ) == IN_USE ) return cl ; } } return null ; }
Remove a free ConnectionListener instance