class VSensorLoader extends Thread {

	public boolean createInputStreams ( VirtualSensor pool ) throws InstantiationException, IllegalAccessException {
		logger.debug ( new StringBuilder ( ).append ( "Preparing input streams for: " ).append ( pool.getConfig().getName ( ) ).toString ( ) );
		if ( pool.getConfig().getInputStreams ( ).size ( ) == 0 ) logger.warn ( new StringBuilder ( "There is no input streams defined for *" ).append ( pool.getConfig().getName ( ) ).append ( "*" ).toString ( ) );
		ArrayList<StreamSource> sources = new ArrayList<StreamSource>();
		ArrayList<InputStream> streams = new ArrayList<InputStream>();
		for ( Iterator < InputStream > inputStreamIterator = pool.getConfig().getInputStreams ( ).iterator ( ) ; inputStreamIterator.hasNext ( ) ; ) {
			InputStream inputStream = inputStreamIterator.next ( );
			for ( StreamSource  dataSouce : inputStream.getSources ( )) {
				if ( ! prepareStreamSource( pool.getConfig(),inputStream , dataSouce )){
					for (StreamSource ss : sources){
						releaseStreamSource(ss);
					}
					for (InputStream is : streams){
						is.release();
					}
					return false;
				}
				sources.add(dataSouce);
			}
			streams.add(inputStream);
			inputStream.setPool (pool );
		}
		return true;
	}

	public  VSensorLoader();
	public  VSensorLoader( String pluginsPath );

}