All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alachisoft.ncache.client.internal.command.GetConnectedClientsCommand Maven / Gradle / Ivy

package com.alachisoft.ncache.client.internal.command;

import com.alachisoft.ncache.common.protobuf.AddAttributeProtocol;
import com.alachisoft.ncache.common.protobuf.CommandProtocol;
import com.alachisoft.ncache.common.protobuf.DictionaryAddProtocol;
import com.alachisoft.ncache.common.protobuf.GetConnectedClientsCommandProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

public class GetConnectedClientsCommand extends Command {

    private GetConnectedClientsCommandProtocol.GetConnectedClientsCommand.Builder _ConnectedClientBuilder;
    private GetConnectedClientsCommandProtocol.GetConnectedClientsCommand _commandInstance;

    public GetConnectedClientsCommand() {
        _ConnectedClientBuilder = GetConnectedClientsCommandProtocol.GetConnectedClientsCommand.newBuilder();
        _ConnectedClientBuilder = _ConnectedClientBuilder.setRequestId(super.getRequestId());
    }
        @Override
    public RequestType getCommandRequestType() {
        return RequestType.InternalCommand;
    }

    @Override
    public CommandType getCommandType() {
        return CommandType.GET_CONNECTED_CLIENTS;
    }

    @Override
    protected  void serializeCommandInternal(ByteArrayOutputStream stream) throws IOException
    {
        _commandInstance.writeTo(stream);
    }
    @Override
    protected short getCommandHandle()
    {
        return (short) CommandProtocol.Command.Type.GET_CONNECTED_CLIENTS.getNumber();
    }

    @Override
    protected void createCommand() throws CommandException {
        _commandInstance= _ConnectedClientBuilder.build();
    }

    public  void setRequestId(long value){
        _ConnectedClientBuilder.setRequestId(value);
        super.setRequestId(value);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy