com.alachisoft.ncache.client.internal.command.GetCacheHostPortCommand 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.GetCacheManagementPortCommandProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;
import com.google.protobuf.ByteString;
import java.io.IOException;
public class GetCacheHostPortCommand extends InitialCommandBase {
private final String cacheid;
public GetCacheHostPortCommand(String id, byte[] userName, byte[] password) {
name = "GetCacheManagementPort";
this.cacheid = id;
}
@Override
protected void createCommand() throws CommandException {
GetCacheManagementPortCommandProtocol.GetCacheManagementPortCommand.Builder builder =
GetCacheManagementPortCommandProtocol.GetCacheManagementPortCommand.newBuilder()
.setCacheId(this.cacheid);
CommandProtocol.Command.Builder commandBuilder = CommandProtocol.Command.newBuilder();
commandBuilder = commandBuilder.setGetCacheManagementPortCommand(builder)
.setRequestID(this.getRequestId())
.setType(CommandProtocol.Command.Type.GET_CACHE_MANAGEMENT_PORT);
super._command = commandBuilder.build();
}
/**
* @return
*/
@Override
public CommandType getCommandType() {
return CommandType.GET_CACHE_MANAGEMENT_PORT;
}
@Override
public RequestType getCommandRequestType() {
return RequestType.InternalCommand;
}
@Override
public boolean getSupportsAacknowledgement() {
return false;
}
}