All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.swisspush.redisques.handler.ReplaceQueueItemHandler Maven / Gradle / Ivy

There is a newer version: 4.1.10
Show newest version
package org.swisspush.redisques.handler;

import io.vertx.core.AsyncResult;
import static org.swisspush.redisques.util.RedisquesAPI.*;
import io.vertx.core.Handler;
import io.vertx.core.eventbus.Message;
import io.vertx.core.json.JsonObject;

/**
 * Class ReplaceQueueItemHandler.
 *
 * @author baldim, https://github.com/mcweba [Marc-Andre Weber]
 */
public class ReplaceQueueItemHandler implements Handler> {
    private Message event;

    public ReplaceQueueItemHandler(Message event) {
        this.event = event;
    }

    @Override
    public void handle(AsyncResult reply) {
        if(reply.succeeded()){
            event.reply(new JsonObject().put(STATUS, OK));
        } else {
            event.reply(new JsonObject().put(STATUS, ERROR));
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy