Class ConfigurationResourceManager

  • All Implemented Interfaces:
    LoggableResource

    public class ConfigurationResourceManager
    extends Object
    implements LoggableResource
    Manage the modifications of configuration resources and notify observers
    Author:
    https://github.com/mcweba [Marc-Andre Weber]
    • Constructor Detail

      • ConfigurationResourceManager

        public ConfigurationResourceManager​(io.vertx.core.Vertx vertx,
                                            ResourceStorage storage)
    • Method Detail

      • getRegisteredResource

        public io.vertx.core.Future<Optional<io.vertx.core.buffer.Buffer>> getRegisteredResource​(String resourceUri)
        Call this method to get the validated registered resource immediately. Otherwise you would have to wait for a change on the corresponding resource.
        Parameters:
        resourceUri - the uri of the registered resource
      • registerResource

        public void registerResource​(String resourceUri,
                                     String resourceSchema)
      • enableResourceLogging

        public void enableResourceLogging​(boolean resourceLoggingEnabled)
        Description copied from interface: LoggableResource
        Enable or disable the resource logging. When enabling the resource logging, make sure to have a consumer for event bus events to the address Address.requestLoggingConsumerAddress() like the RequestLoggingConsumer class from gateleen-logging module.
        Specified by:
        enableResourceLogging in interface LoggableResource
        Parameters:
        resourceLoggingEnabled - boolean value whether to enable or disable the resource logging
      • handleConfigurationResource

        public boolean handleConfigurationResource​(io.vertx.core.http.HttpServerRequest request)