
com.alachisoft.ncache.client.internal.command.GetRunningServersCommand Maven / Gradle / Ivy
package com.alachisoft.ncache.client.internal.command;
import com.alachisoft.ncache.common.protobuf.CommandProtocol;
import com.alachisoft.ncache.common.protobuf.GetRunningServersCommandProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;
import com.google.protobuf.ByteString;
import java.io.IOException;
/**
* @author Administrator
*/
public class GetRunningServersCommand extends Command {
String cacheid;
private ByteString userName;
private ByteString password;
public GetRunningServersCommand(String id, byte[] userName, byte[] password) {
name = "GetRunningServersCommand";
this.cacheid = id;
this.userName = ByteString.copyFrom(userName);
this.password = ByteString.copyFrom(password);
}
@Override
protected void createCommand() throws CommandException {
GetRunningServersCommandProtocol.GetRunningServersCommand.Builder builder =
GetRunningServersCommandProtocol.GetRunningServersCommand.newBuilder()
.setCacheId(this.cacheid)
.setBinaryUserId(this.userName)
.setBinaryPassword(this.password);
CommandProtocol.Command.Builder commandBuilder =
CommandProtocol.Command.newBuilder();
commandBuilder = commandBuilder.setGetRunningServersCommand(builder)
.setRequestID(this.getRequestId())
.setType(CommandProtocol.Command.Type.GET_RUNNING_SERVERS);
_command = commandBuilder.build();
}
public CommandType getCommandType() {
return CommandType.GET_RUNNING_SERVERS;
}
@Override
public RequestType getCommandRequestType() {
return RequestType.InternalCommand;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy