/** * Scans for factory plug-ins on the application class path. This method is needed because the * application class path can theoretically change, or additional plug-ins may become available. * Rather than re-scanning the classpath on every invocation of the API, the class path is * scanned automatically only on the first invocation. Clients can call this method to prompt a * re-scan. Thus this method need only be invoked by sophisticated applications which * dynamically make new plug-ins available at runtime. */ public static synchronized void scanForPlugins() { getServiceRegistry().scanForPlugins(); }
/** * Finds all implemtaions of DataStoreFactory which have registered using the services * mechanism, regardless weather it has the appropriate libraries on the classpath. * * @return An iterator over all discovered datastores which have registered factories */ public static synchronized Iterator<DataStoreFactorySpi> getAllDataStores() { return DataAccessFinder.getAllDataStores(getServiceRegistry(), DataStoreFactorySpi.class); }
/** * Finds all implemtaions of DataStoreFactory which have registered using the services * mechanism, and that have the appropriate libraries on the classpath. * * @return An iterator over all discovered datastores which have registered factories, and whose * available method returns true. */ public static synchronized Iterator<DataStoreFactorySpi> getAvailableDataStores() { Set<DataStoreFactorySpi> availableDS; FactoryRegistry serviceRegistry = getServiceRegistry(); availableDS = DataAccessFinder.getAvailableDataStores(serviceRegistry, DataStoreFactorySpi.class); return availableDS.iterator(); }
/** * Finds all implemtaions of DataStoreFactory which have registered using * the services mechanism, regardless weather it has the appropriate * libraries on the classpath. * * @return An iterator over all discovered datastores which have registered * factories */ public static synchronized Iterator<DataStoreFactorySpi> getAllDataStores() { return DataAccessFinder.getAllDataStores(getServiceRegistry(), DataStoreFactorySpi.class); }
/** * Scans for factory plug-ins on the application class path. This method is * needed because the application class path can theoretically change, or * additional plug-ins may become available. Rather than re-scanning the * classpath on every invocation of the API, the class path is scanned * automatically only on the first invocation. Clients can call this method * to prompt a re-scan. Thus this method need only be invoked by * sophisticated applications which dynamically make new plug-ins available * at runtime. */ public static synchronized void scanForPlugins() { getServiceRegistry().scanForPlugins(); }
/** * Finds all implemtaions of DataStoreFactory which have registered using * the services mechanism, and that have the appropriate libraries on the * classpath. * * @return An iterator over all discovered datastores which have registered * factories, and whose available method returns true. */ public static synchronized Iterator<DataStoreFactorySpi> getAvailableDataStores() { Set<DataStoreFactorySpi> availableDS; FactoryRegistry serviceRegistry = getServiceRegistry(); availableDS = DataAccessFinder.getAvailableDataStores(serviceRegistry, DataStoreFactorySpi.class); return availableDS.iterator(); }
/** * Scans for factory plug-ins on the application class path. This method is * needed because the application class path can theoretically change, or * additional plug-ins may become available. Rather than re-scanning the * classpath on every invocation of the API, the class path is scanned * automatically only on the first invocation. Clients can call this method * to prompt a re-scan. Thus this method need only be invoked by * sophisticated applications which dynamically make new plug-ins available * at runtime. */ public static synchronized void scanForPlugins() { getServiceRegistry().scanForPlugins(); } }
/** * Finds all implemtaions of DataStoreFactory which have registered using * the services mechanism, and that have the appropriate libraries on the * classpath. * * @return An iterator over all discovered datastores which have registered * factories, and whose available method returns true. */ public static synchronized Iterator getAvailableDataStores() { Set availableDS = new HashSet(5); Iterator it = getServiceRegistry().getServiceProviders(DataStoreFactorySpi.class); DataStoreFactorySpi dsFactory; while (it.hasNext()) { dsFactory = (DataStoreFactorySpi) it.next(); if (dsFactory.isAvailable()) { availableDS.add(dsFactory); } } return availableDS.iterator(); }