@Test public void getAppComponents() { prepareExtension(); extension.init(kieServer, registry); List<Object> components = extension.getAppComponents(SupportedTransports.REST); assertEquals(1, components.size()); assertTrue(components.get(0) instanceof DummyKieServerApplicationComponentService.DummyComponent); }
@Override public List<Object> getAppComponents(SupportedTransports type) { ServiceLoader<KieServerApplicationComponentsService> appComponentsServices = ServiceLoader.load(KieServerApplicationComponentsService.class); List<Object> appComponentsList = new ArrayList<>(); Object[] componentServices = {taskAssigningRuntimeServiceBase, registry}; for (KieServerApplicationComponentsService appComponentsService : appComponentsServices) { appComponentsList.addAll(appComponentsService.getAppComponents(EXTENSION_NAME, type, componentServices)); } return appComponentsList; }
TaskAssigningRuntimeKieServerExtension implements KieServerExtension { @Override public List<Object> getAppComponents(SupportedTransports type) { ServiceLoader<KieServerApplicationComponentsService> appComponentsServices = ServiceLoader.load(KieServerApplicationComponentsService.class); List<Object> appComponentsList = new ArrayList<>(); Object[] componentServices = {taskAssigningRuntimeServiceBase, registry}; for (KieServerApplicationComponentsService appComponentsService : appComponentsServices) { appComponentsList.addAll(appComponentsService.getAppComponents(EXTENSION_NAME, type, componentServices)); } return appComponentsList; } }
TaskAssigningRuntimeKieServerExtension implements KieServerExtension { @Override public List<Object> getAppComponents(SupportedTransports type) { ServiceLoader<KieServerApplicationComponentsService> appComponentsServices = ServiceLoader.load(KieServerApplicationComponentsService.class); List<Object> appComponentsList = new ArrayList<>(); Object[] componentServices = {taskAssigningRuntimeServiceBase, registry}; for (KieServerApplicationComponentsService appComponentsService : appComponentsServices) { appComponentsList.addAll(appComponentsService.getAppComponents(EXTENSION_NAME, type, componentServices)); } return appComponentsList; }  }
TaskAssigningRuntimeKieServerExtension implements KieServerExtension { @Override public List<Object> getAppComponents(SupportedTransports type) { ServiceLoader<KieServerApplicationComponentsService> appComponentsServices = ServiceLoader.load(KieServerApplicationComponentsService.class); List<Object> appComponentsList = new ArrayList<>(); Object[] componentServices = {taskAssigningRuntimeServiceBase, registry}; for (KieServerApplicationComponentsService appComponentsService : appComponentsServices) { appComponentsList.addAll(appComponentsService.getAppComponents(EXTENSION_NAME, type, componentServices)); } return appComponentsList; }  @Override boolean isInitialized(); @Override boolean isActive(); @Override void init(KieServerImpl kieServer, KieServerRegistry registry); @Override void destroy(KieServerImpl kieServer, KieServerRegistry registry); @Override void createContainer(String id, KieContainerInstance kieContainerInstance, Map<String, Object> parameters); @Override void updateContainer(String id, KieContainerInstance kieContainerInstance, Map<String, Object> parameters); @Override boolean isUpdateContainerAllowed(String id, KieContainerInstance kieContainerInstance, Map<String, Object> parameters); @Override void disposeContainer(String id, KieContainerInstance kieContainerInstance, Map<String, Object> parameters); @Override List<Object> getAppComponents(SupportedTransports type); @Override T getAppComponents(Class<T> serviceType); @Override String getImplementedCapability(); @Override List<Object> getServices(); @Override String getExtensionName(); @Override Integer getStartOrder(); @Override String toString(); @Override List<Message> healthCheck(boolean report); }
TaskAssigningRuntimeKieServerExtension implements KieServerExtension { @Override public List<Object> getAppComponents(SupportedTransports type) { ServiceLoader<KieServerApplicationComponentsService> appComponentsServices = ServiceLoader.load(KieServerApplicationComponentsService.class); List<Object> appComponentsList = new ArrayList<>(); Object[] componentServices = {taskAssigningRuntimeServiceBase, registry}; for (KieServerApplicationComponentsService appComponentsService : appComponentsServices) { appComponentsList.addAll(appComponentsService.getAppComponents(EXTENSION_NAME, type, componentServices)); } return appComponentsList; }  @Override boolean isInitialized(); @Override boolean isActive(); @Override void init(KieServerImpl kieServer, KieServerRegistry registry); @Override void destroy(KieServerImpl kieServer, KieServerRegistry registry); @Override void createContainer(String id, KieContainerInstance kieContainerInstance, Map<String, Object> parameters); @Override void updateContainer(String id, KieContainerInstance kieContainerInstance, Map<String, Object> parameters); @Override boolean isUpdateContainerAllowed(String id, KieContainerInstance kieContainerInstance, Map<String, Object> parameters); @Override void disposeContainer(String id, KieContainerInstance kieContainerInstance, Map<String, Object> parameters); @Override List<Object> getAppComponents(SupportedTransports type); @Override T getAppComponents(Class<T> serviceType); @Override String getImplementedCapability(); @Override List<Object> getServices(); @Override String getExtensionName(); @Override Integer getStartOrder(); @Override String toString(); @Override List<Message> healthCheck(boolean report); static final String EXTENSION_NAME; }