@Eventablepublicvoidhandle(ServiceNotificationEvent event) {ServiceState serviceState =ServiceState.valueOf(event.getServiceState());finalString templateName =event.getTemplateName();finalString serviceId =event.getServiceId().substring(0,5);finalString nodeId =event.getNodeId() ==null?"Unknown":event.getNodeId().substring(0,5);switch (serviceState) {case REQUESTED ->broadcast("Service %s-%s has been queued".formatted(templateName, serviceId)); case STARTING -> broadcast("Service %s-%s is now starting on Node-%s".formatted(templateName, serviceId, nodeId));
case RUNNING -> broadcast("Service %s-%s is now running on Node-%s".formatted(templateName, serviceId, nodeId));
case OFFLINE -> broadcast("Service %s-%s is now stopping on Node-%s".formatted(templateName, serviceId, nodeId));
}}