com.github.tonivade.resp.command.server.EchoCommand Maven / Gradle / Ivy
/*
* Copyright (c) 2015-2017, Antonio Gabriel Muñoz Conejo
* Distributed under the terms of the MIT License
*/
package com.github.tonivade.resp.command.server;
import static com.github.tonivade.resp.protocol.RedisToken.string;
import com.github.tonivade.resp.annotation.Command;
import com.github.tonivade.resp.annotation.ParamLength;
import com.github.tonivade.resp.command.ICommand;
import com.github.tonivade.resp.command.IRequest;
import com.github.tonivade.resp.protocol.RedisToken;
@Command("echo")
@ParamLength(1)
public class EchoCommand implements ICommand {
@Override
public RedisToken> execute(IRequest request) {
return string(request.getParam(0));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy