@Reference( cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public void bind(ICommissioningSystemDriverFactory driverFactory) { log.debug("Binding " + driverFactory.getClass().getName()); driverFactories.put(driverFactory.getIdentification(), driverFactory); }
public static String getInfoStringForDriver(UUID driverUuid, boolean extended) { ICommissioningSystemDriverFactory icsdf = driverFactories.get(driverUuid); if (icsdf != null) { if (extended) { return icsdf.getName() + " (" + icsdf.getDescription() + ")"; } else { return icsdf.getName(); } } return ""; }
public void unbind(ICommissioningSystemDriverFactory driverFactory) { log.debug("Unbinding " + driverFactory.getClass().getName()); log.info( "Shutting down stock commissioning systems for driver id [{}]", driverFactory.getIdentification().toString()); IStatus status = StockCommissioningSystemService.INSTANCE.shutdownInstancesUsingDriver( driverFactory.getIdentification()); if (!status.isOK()) { StatusUtil.logStatus(log, status, true); } driverFactories.remove(driverFactory.getIdentification()); }