Class QueueCircuitBreakerConfigurationResourceManager

  • All Implemented Interfaces:
    org.swisspush.gateleen.core.logging.LoggableResource

    public class QueueCircuitBreakerConfigurationResourceManager
    extends java.lang.Object
    implements org.swisspush.gateleen.core.logging.LoggableResource
    Author:
    https://github.com/mcweba [Marc-Andre Weber]
    • Constructor Detail

      • QueueCircuitBreakerConfigurationResourceManager

        public QueueCircuitBreakerConfigurationResourceManager​(io.vertx.core.Vertx vertx,
                                                               org.swisspush.gateleen.core.storage.ResourceStorage storage,
                                                               java.lang.String circuitBreakerConfigUri)
    • Method Detail

      • enableResourceLogging

        public void enableResourceLogging​(boolean resourceLoggingEnabled)
        Specified by:
        enableResourceLogging in interface org.swisspush.gateleen.core.logging.LoggableResource
      • addRefreshable

        public void addRefreshable​(org.swisspush.gateleen.core.refresh.Refreshable refreshable)
        Adds a new Refreshable.
        All refreshables will be refreshed, if the QueueCircuitBreakerConfigurationResource changes.
        Parameters:
        refreshable - - an instance of Refreshable
      • handleConfigurationResource

        public boolean handleConfigurationResource​(io.vertx.core.http.HttpServerRequest request)
        Handles the provided request when the following conditions are met:
        • Request URI matches the configured circuit breaker configuration URI
        • Request method is either PUT or DELETE
        Parameters:
        request - the request to handle
        Returns:
        returns true if the specified conditions are met, false otherwise