com.alachisoft.ncache.client.internal.command.GetRunningServersCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ncache-professional-client Show documentation
Show all versions of ncache-professional-client Show documentation
NCache Professional client for java.
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;
public GetRunningServersCommand(String id, byte[] userName, byte[] password) {
name = "GetRunningServersCommand";
this.cacheid = id;
}
@Override
protected void createCommand() throws CommandException {
GetRunningServersCommandProtocol.GetRunningServersCommand.Builder builder =
GetRunningServersCommandProtocol.GetRunningServersCommand.newBuilder()
.setCacheId(this.cacheid);
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;
}
}