Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13514

ConfigurationListener missing "create-template" event

    XMLWordPrintable

Details

    Description

      We have events for remove-template, but not create-template because the @Listener implementation is as follows:

            @ConfigurationChanged
            public CompletionStage<Void> onConfigurationEvent(ConfigurationChangedEvent event) {
               String eventType = event.getConfigurationEventType().toString().toLowerCase() + "-" + event.getConfigurationEntityType();
               final ServerSentEvent sse;
               if (event.getConfigurationEventType() == ConfigurationChangedEvent.EventType.REMOVE) {
                  sse = new ServerSentEvent(eventType, event.getConfigurationEntityName());
               } else {
                  switch (event.getConfigurationEntityType()) {
                     case "cache":
                        try {
                           sse = new ServerSentEvent(eventType, cacheConfig(cacheManager, event.getConfigurationEntityName(), mediaType));
                        } catch (Exception e) {
                           Log.REST.errorf(e, "Could not serialize cache configuration");
                           return CompletableFutures.completedNull();
                        }
                        break;
                     default:
                        // Unhandled entity type, ignore
                        return CompletableFutures.completedNull();
                  }
               }
               return eventStream.sendEvent(sse);
            }
         }
      

      Attachments

        Activity

          People

            remerson@redhat.com Ryan Emerson
            remerson@redhat.com Ryan Emerson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: