public void addOutputPlugin ( OutputPluginModel < ? , ? > outputPlugin ) throws IllegalIDException { if ( ! futureHashMap . containsKey ( outputPlugin . getID ( ) ) ) { outputPlugins . add ( outputPlugin ) ; futureHashMap . put ( outputPlugin . getID ( ) , submit ( outputPlugin ) ) ; } else { if ( futureHashMap . get ( outputPlugin . getID ( ) ) . isDone ( ) ) { futureHashMap . remove ( outputPlugin . getID ( ) ) ; futureHashMap . put ( outputPlugin . getID ( ) , submit ( outputPlugin ) ) ; } } }
adds outputPlugin to outputPluginList starts a new thread for the outputPlugin and stores the future object in a HashMap