Class QueueCircuitBreakerConfigurationResourceManager
- java.lang.Object
-
- org.swisspush.gateleen.queue.queuing.circuitbreaker.configuration.QueueCircuitBreakerConfigurationResourceManager
-
- All Implemented Interfaces:
LoggableResource
public class QueueCircuitBreakerConfigurationResourceManager extends Object implements LoggableResource
Manager class for theQueueCircuitBreakerConfigurationResource.- Author:
- https://github.com/mcweba [Marc-Andre Weber]
-
-
Constructor Summary
Constructors Constructor Description QueueCircuitBreakerConfigurationResourceManager(io.vertx.core.Vertx vertx, ResourceStorage storage, String circuitBreakerConfigUri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRefreshable(Refreshable refreshable)Adds a new Refreshable.voidenableResourceLogging(boolean resourceLoggingEnabled)QueueCircuitBreakerConfigurationResourcegetConfigurationResource()Get theQueueCircuitBreakerConfigurationResourcewith the actual configuration values.booleanhandleConfigurationResource(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
-
-
-
Constructor Detail
-
QueueCircuitBreakerConfigurationResourceManager
public QueueCircuitBreakerConfigurationResourceManager(io.vertx.core.Vertx vertx, ResourceStorage storage, String circuitBreakerConfigUri)
-
-
Method Detail
-
getConfigurationResource
public QueueCircuitBreakerConfigurationResource getConfigurationResource()
Get theQueueCircuitBreakerConfigurationResourcewith the actual configuration values. When the config resource isnull, a newQueueCircuitBreakerConfigurationResourcewith the default values is returned.- Returns:
- returns the
QueueCircuitBreakerConfigurationResource
-
enableResourceLogging
public void enableResourceLogging(boolean resourceLoggingEnabled)
- Specified by:
enableResourceLoggingin interfaceLoggableResource
-
addRefreshable
public void addRefreshable(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
-
-