use of org.kie.server.services.taskassigning.user.system.api.UserSystemService in project droolsjbpm-integration by kiegroup.
the class UserSystemServiceLoader method loadServices.
public static Map<String, UserSystemService> loadServices(ClassLoader cl) {
final Map<String, UserSystemService> result = new HashMap<>();
final ServiceLoader<UserSystemService> availableServices = ServiceLoader.load(UserSystemService.class, cl);
for (UserSystemService service : availableServices) {
Object existed = result.putIfAbsent(service.getName(), service);
if (existed == null) {
LOGGER.debug("UserSystemService {} was added to the result", service.getName());
} else {
LOGGER.warn("UserSystemService {} was already added to the result, this another instance will be discarded.", service);
}
}
return result;
}
Aggregations