@Override public NotificationService getNotificationService() { return WebSocketNotificationService.getInstance(); } }
@Override public void notify(final ServerTemplateDeleted serverTemplateDeleted) { LOGGER.info("WebSocket notify on deleted :: {}", serverTemplateDeleted); notifySessions(serverTemplateDeleted); }
@Test public void testServerInstanceDisconnected() throws Exception { final ServerInstanceDisconnected event = new ServerInstanceDisconnected("serverId"); notificationService.notify(event); verify(endpoint, timeout(TIMEOUT)).sendObject(new KieServerControllerNotification(event)); }
@Test public void testServerInstanceDeleted() throws Exception { final ServerInstanceDeleted event = new ServerInstanceDeleted("serverId"); notificationService.notify(event); verify(endpoint, timeout(TIMEOUT)).sendObject(new KieServerControllerNotification(event)); }
@Override public void notify(final ServerInstanceDeleted serverInstanceDeleted) { LOGGER.info("WebSocket notify on instance deleted :: {}", serverInstanceDeleted); notifySessions(serverInstanceDeleted); }
@Test public void testServerTemplateDeleted() throws Exception { final ServerTemplateDeleted event = new ServerTemplateDeleted("serverTemplateId"); notificationService.notify(event); verify(endpoint, timeout(TIMEOUT)).sendObject(new KieServerControllerNotification(event)); }
@Override public void notify(final ServerInstanceConnected serverInstanceConnected) { LOGGER.info("WebSocket notify on instance connected :: {}", serverInstanceConnected); notifySessions(serverInstanceConnected); }
@Test public void testContainerSpecUpdated() throws Exception { final ServerTemplate serverTemplate = new ServerTemplate(); final ContainerSpec containerSpec = new ContainerSpec(); final ArrayList<Container> containers = new ArrayList<>(); final ContainerSpecUpdated event = new ContainerSpecUpdated(serverTemplate, containerSpec, containers); notificationService.notify(serverTemplate, containerSpec, containers); verify(endpoint, timeout(TIMEOUT)).sendObject(new KieServerControllerNotification(event)); } }
@Override public void notify(final ServerInstanceDisconnected serverInstanceDisconnected) { LOGGER.info("WebSocket notify on instance disconnected :: {}", serverInstanceDisconnected); notifySessions(serverInstanceDisconnected); } }
@Test public void testServerTemplateUpdated() throws Exception { final ServerTemplateUpdated event = new ServerTemplateUpdated(new ServerTemplate()); notificationService.notify(event); verify(endpoint, timeout(TIMEOUT)).sendObject(new KieServerControllerNotification(event)); }
@Override public void notify(final ServerInstanceUpdated serverInstanceUpdated) { LOGGER.info("WebSocket notify on instance updated :: {}", serverInstanceUpdated); notifySessions(serverInstanceUpdated); }
@Test public void testServerInstanceConnected() throws Exception { final ServerInstanceConnected event = new ServerInstanceConnected(new ServerInstance()); notificationService.notify(event); verify(endpoint, timeout(TIMEOUT)).sendObject(new KieServerControllerNotification(event)); }
@Override public void notify(final ServerTemplateUpdated serverTemplateUpdated) { LOGGER.info("WebSocket notify on updated :: {}", serverTemplateUpdated); notifySessions(serverTemplateUpdated); }
@Test public void testServerInstanceUpdated() throws Exception { final ServerInstanceUpdated event = new ServerInstanceUpdated(new ServerInstance()); notificationService.notify(event); verify(endpoint, timeout(TIMEOUT)).sendObject(new KieServerControllerNotification(event)); }
@Override public void notify(final ServerTemplate serverTemplate, final ContainerSpec containerSpec, final List<Container> containers) { LOGGER.info("WebSocket notification about change requested on server {} with container spec {} with following result {}", serverTemplate, containerSpec, containers); notifySessions(new ContainerSpecUpdated(serverTemplate, containerSpec, containers)); }