![JAR search and dependency download from the Maven repository](/logo.png)
org.infinispan.server.resp.commands.connection.MODULE Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-server-resp Show documentation
Show all versions of infinispan-server-resp Show documentation
Infinispan Resp Protocol Server
package org.infinispan.server.resp.commands.connection;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.concurrent.CompletionStage;
import org.infinispan.security.AuthorizationPermission;
import org.infinispan.server.resp.Resp3Handler;
import org.infinispan.server.resp.RespCommand;
import org.infinispan.server.resp.RespErrorUtil;
import org.infinispan.server.resp.RespRequestHandler;
import org.infinispan.server.resp.commands.Resp3Command;
import org.infinispan.server.resp.serialization.Resp3Response;
import io.netty.channel.ChannelHandlerContext;
/**
* MODULE LIST
*
* @since 15.0
*/
public class MODULE extends RespCommand implements Resp3Command {
public MODULE() {
super(-1, 0, 0, 0);
}
@Override
public CompletionStage perform(Resp3Handler handler, ChannelHandlerContext ctx,
List arguments) {
handler.checkPermission(AuthorizationPermission.ADMIN);
String subcommand = new String(arguments.get(0), StandardCharsets.UTF_8).toUpperCase();
switch (subcommand) {
case "LIST":
Resp3Response.arrayEmpty(handler.allocator());
break;
case "LOAD":
case "LOADEX":
case "UNLOAD":
RespErrorUtil.customError("module loading/unloading unsupported", handler.allocator());
break;
}
return handler.myStage();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy