}
@Override
public void register(String eventName) {
String registrationId = UUID.randomUUID().toString();
WebsocketBindingCallback callback = componentContext.getRequestContext().getCallback();
clients.put(registrationId, callback);
synchronized (eventListeners) {
eventListeners.put(eventName, registrationId);
}
Event event = new Event();
event.setId(registrationId);
event.setName(eventName);
event.setData(new Date().toString());
callback.sendMessage(event);
}