@Test public void testServerInstanceConnected() { handler.accept(new ServerInstanceConnected(new ServerInstance())); verify(eventHandler).onServerInstanceConnected(any()); verifyNoMoreInteractions(eventHandler); }
@Override public void accept(final KieServerControllerEvent event) { LOGGER.debug("Handling Kie Server Controller event: {}", event); if (event instanceof ServerInstanceConnected) { handler.onServerInstanceConnected((ServerInstanceConnected)event); } else if(event instanceof ServerInstanceDeleted){ handler.onServerInstanceDeleted((ServerInstanceDeleted)event); } else if(event instanceof ServerInstanceDisconnected){ handler.onServerInstanceDisconnected((ServerInstanceDisconnected)event); } else if(event instanceof ServerInstanceUpdated){ handler.onServerInstanceUpdated((ServerInstanceUpdated)event); } else if(event instanceof ServerTemplateDeleted){ handler.onServerTemplateDeleted((ServerTemplateDeleted)event); } else if(event instanceof ServerTemplateUpdated){ handler.onServerTemplateUpdated((ServerTemplateUpdated)event); } else if(event instanceof ContainerSpecUpdated){ handler.onContainerSpecUpdated((ContainerSpecUpdated)event); } else { LOGGER.warn("Unable to handle Kie Server Controller event: {}", event); } }
WebSocketEventHandler implements Consumer<KieServerControllerEvent> { @Override public void accept(final KieServerControllerEvent event) { LOGGER.debug("Handling Kie Server Controller event: {}", event); if (event instanceof ServerInstanceConnected) { handler.onServerInstanceConnected((ServerInstanceConnected)event); } else if(event instanceof ServerInstanceDeleted){ handler.onServerInstanceDeleted((ServerInstanceDeleted)event); } else if(event instanceof ServerInstanceDisconnected){ handler.onServerInstanceDisconnected((ServerInstanceDisconnected)event); } else if(event instanceof ServerInstanceUpdated){ handler.onServerInstanceUpdated((ServerInstanceUpdated)event); } else if(event instanceof ServerTemplateDeleted){ handler.onServerTemplateDeleted((ServerTemplateDeleted)event); } else if(event instanceof ServerTemplateUpdated){ handler.onServerTemplateUpdated((ServerTemplateUpdated)event); } else if(event instanceof ContainerSpecUpdated){ handler.onContainerSpecUpdated((ContainerSpecUpdated)event); } else { LOGGER.warn("Unable to handle Kie Server Controller event: {}", event); } } }
WebSocketEventHandler implements Consumer<KieServerControllerEvent> { @Override public void accept(final KieServerControllerEvent event) { LOGGER.debug("Handling Kie Server Controller event: {}", event); if (event instanceof ServerInstanceConnected) { handler.onServerInstanceConnected((ServerInstanceConnected)event); } else if(event instanceof ServerInstanceDeleted){ handler.onServerInstanceDeleted((ServerInstanceDeleted)event); } else if(event instanceof ServerInstanceDisconnected){ handler.onServerInstanceDisconnected((ServerInstanceDisconnected)event); } else if(event instanceof ServerInstanceUpdated){ handler.onServerInstanceUpdated((ServerInstanceUpdated)event); } else if(event instanceof ServerTemplateDeleted){ handler.onServerTemplateDeleted((ServerTemplateDeleted)event); } else if(event instanceof ServerTemplateUpdated){ handler.onServerTemplateUpdated((ServerTemplateUpdated)event); } else if(event instanceof ContainerSpecUpdated){ handler.onContainerSpecUpdated((ContainerSpecUpdated)event); } else { LOGGER.warn("Unable to handle Kie Server Controller event: {}", event); } } WebSocketEventHandler(final EventHandler handler); }
WebSocketEventHandler implements Consumer<KieServerControllerEvent> { @Override public void accept(final KieServerControllerEvent event) { LOGGER.debug("Handling Kie Server Controller event: {}", event); if (event instanceof ServerInstanceConnected) { handler.onServerInstanceConnected((ServerInstanceConnected)event); } else if(event instanceof ServerInstanceDeleted){ handler.onServerInstanceDeleted((ServerInstanceDeleted)event); } else if(event instanceof ServerInstanceDisconnected){ handler.onServerInstanceDisconnected((ServerInstanceDisconnected)event); } else if(event instanceof ServerInstanceUpdated){ handler.onServerInstanceUpdated((ServerInstanceUpdated)event); } else if(event instanceof ServerTemplateDeleted){ handler.onServerTemplateDeleted((ServerTemplateDeleted)event); } else if(event instanceof ServerTemplateUpdated){ handler.onServerTemplateUpdated((ServerTemplateUpdated)event); } else if(event instanceof ContainerSpecUpdated){ handler.onContainerSpecUpdated((ContainerSpecUpdated)event); } else { LOGGER.warn("Unable to handle Kie Server Controller event: {}", event); } } WebSocketEventHandler(final EventHandler handler); @Override void accept(final KieServerControllerEvent event); }
WebSocketEventHandler implements Consumer<KieServerControllerEvent> { @Override public void accept(final KieServerControllerEvent event) { LOGGER.debug("Handling Kie Server Controller event: {}", event); if (event instanceof ServerInstanceConnected) { handler.onServerInstanceConnected((ServerInstanceConnected)event); } else if(event instanceof ServerInstanceDeleted){ handler.onServerInstanceDeleted((ServerInstanceDeleted)event); } else if(event instanceof ServerInstanceDisconnected){ handler.onServerInstanceDisconnected((ServerInstanceDisconnected)event); } else if(event instanceof ServerInstanceUpdated){ handler.onServerInstanceUpdated((ServerInstanceUpdated)event); } else if(event instanceof ServerTemplateDeleted){ handler.onServerTemplateDeleted((ServerTemplateDeleted)event); } else if(event instanceof ServerTemplateUpdated){ handler.onServerTemplateUpdated((ServerTemplateUpdated)event); } else if(event instanceof ContainerSpecUpdated){ handler.onContainerSpecUpdated((ContainerSpecUpdated)event); } else { LOGGER.warn("Unable to handle Kie Server Controller event: {}", event); } } WebSocketEventHandler(final EventHandler handler); @Override void accept(final KieServerControllerEvent event);  }