class VSensorLoader extends Thread {

    public boolean prepareStreamSource ( VSensorConfig vsensorConfig,InputStream inputStream , StreamSource streamSource  ) throws InstantiationException, IllegalAccessException {
        streamSource.setInputStream(inputStream);
        AbstractWrapper wrapper = null;
        for ( AddressBean addressBean : streamSource.getAddressing ( ) ) {
            addressBean.setInputStreamName(inputStream.getInputStreamName());
            addressBean.setVirtualSensorName(vsensorConfig.getName());
            wrapper = findWrapper(addressBean);
            try {
                if (wrapper!=null && prepareStreamSource( streamSource,wrapper.getOutputFormat(),wrapper))
                    break;
                else
                    //TODO: remove wrapper from activeWrappers and release its resources
                    wrapper=null;
            } catch (SQLException e) {
                logger.error(e.getMessage(),e);
                logger.error("Preparation of the stream source failed : "+streamSource.getAlias()+ " from the input stream : "+inputStream.getInputStreamName());
            }
        }
        return (wrapper!=null);
    }

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

}