Class QueueProcessor


  • public class QueueProcessor
    extends Object
    Author:
    https://github.com/lbovet [Laurent Bovet]
    • Constructor Detail

      • QueueProcessor

        public QueueProcessor​(io.vertx.core.Vertx vertx,
                              io.vertx.core.http.HttpClient httpClient,
                              org.swisspush.gateleen.monitoring.MonitoringHandler monitoringHandler)
      • QueueProcessor

        public QueueProcessor​(io.vertx.core.Vertx vertx,
                              io.vertx.core.http.HttpClient httpClient,
                              org.swisspush.gateleen.monitoring.MonitoringHandler monitoringHandler,
                              QueueCircuitBreaker queueCircuitBreaker)
      • QueueProcessor

        public QueueProcessor​(io.vertx.core.Vertx vertx,
                              io.vertx.core.http.HttpClient httpClient,
                              org.swisspush.gateleen.monitoring.MonitoringHandler monitoringHandler,
                              QueueCircuitBreaker queueCircuitBreaker,
                              GateleenExceptionFactory exceptionFactory,
                              boolean immediatelyStartQueueProcessing)
    • Method Detail

      • startQueueProcessing

        public void startQueueProcessing()
      • stopQueueProcessing

        public void stopQueueProcessing()
      • isQueueProcessingStarted

        public boolean isQueueProcessingStarted()
      • getQueueProcessorAddress

        public String getQueueProcessorAddress()
      • httpMethodIsQueueable

        public static boolean httpMethodIsQueueable​(io.vertx.core.http.HttpMethod method)

        Answers if specified method is valid for queueing.

        QueueProcessor will only be able to deliver requests where HttpRequest(JsonObject) will NOT throw. Therefore there's no sense to enqueue a request which we cannot process in startQueueProcessing().

        Returns:
        True if method is allowed to be enqueued. Not all methods are allowed here because we deliver only whitelisted methods.
      • getHttpClient

        public io.vertx.core.http.HttpClient getHttpClient()