class VSensorLoader extends Thread {

    public void releaseStreamSource(StreamSource streamSource) {
        final AbstractWrapper wrapper = streamSource.getWrapper ( );
        streamSource.getInputStream().getRenamingMapping().remove(streamSource.getAlias());
        try {
            wrapper.removeListener(streamSource);
        } catch (SQLException e) {
            logger.error(e.getMessage(),e);
            logger.error("Release the resources failed !");
        }
        if ( !wrapper.isActive()) {//This stream source is the only listener
            logger.debug("The wrapper:"+wrapper.getName()+" is removed.");
            activeWrappers.remove ( wrapper );
        }else {
            logger.debug("The wrapper:"+wrapper.getName()+" is not released as it is still used by other virtual sensors.");
        }
    }

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

}