org.swisspush.redisques.handler.ReplaceQueueItemHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redisques Show documentation
Show all versions of redisques Show documentation
A highly scalable redis-persistent queuing system for vertx
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