public Result execute() {

        switch (command.getCommandName()) {
            case USER_LOGIN:
                serverCommand = new LoginCommand();
                break;

            case USER_REGISTRATION:
                serverCommand = new RegistrationCommand();
                break;

            case DELETE_LABEL:
                serverCommand = new DeleteLabelCommand();
                break;

            case RENAME_LABEL:
                serverCommand = new RenameLabelCommand();
                break;

            case GET_MESSAGES:
                serverCommand = new GetMessagesCommand();
                break;

            case SEND_MESSAGE:
                serverCommand = new SendMessageCommand();
                break;

            case GET_SEND_MESSAGE:
                serverCommand = new GetSendMessageCommand();
                break;

            case GEt_MESSAGE_BY_ID:
                serverCommand = new GetMessageByIdCommand();
                break;

            default:
                serverCommand = new UnknownCommand();
                break;
        }
        result = serverCommand.execute(command);
        return result;
    }