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

com.metaring.framework.rpc.auth.AuthFunctionalitiesManager Maven / Gradle / Ivy

There is a newer version: 1.5.9
Show newest version
package com.metaring.framework.rpc.auth;

import com.metaring.framework.functionality.FunctionalityInfo;
import com.metaring.framework.functionality.FunctionalitiesManager;
import com.metaring.framework.functionality.GeneratedFunctionalitiesManager;
import com.metaring.framework.functionality.Functionality;
import java.util.concurrent.CompletableFuture;
import com.metaring.framework.rpc.RpcRequest;
import com.metaring.framework.rpc.RpcResponse;

public class AuthFunctionalitiesManager extends FunctionalitiesManager implements GeneratedFunctionalitiesManager {

    public static final FunctionalityInfo CALL_RESERVED = CallReservedFunctionality.INFO;

    public static final FunctionalityInfo CALL_RESTRICTED = CallRestrictedFunctionality.INFO;

    public static final CompletableFuture callReserved(RpcRequest rpcRequest) {
        return call(CALL_RESERVED, CallReservedFunctionality.class, getCallingFunctionality(), rpcRequest, result -> result.as(RpcResponse.class));
    }

    public static final CompletableFuture callReserved(Functionality functionality, RpcRequest rpcRequest) {
        return call(CALL_RESERVED, CallReservedFunctionality.class, functionality, rpcRequest, result -> result.as(RpcResponse.class));
    }

    public static final CompletableFuture callReservedFromJson(String rpcRequestJson) {
        return callFromJson(CALL_RESERVED, CallReservedFunctionality.class, getCallingFunctionality(), rpcRequestJson, result -> result.as(RpcResponse.class));
    }

    public static final CompletableFuture callReservedFromJson(Functionality callingFunctionality, String rpcRequestJson) {
        return callFromJson(CALL_RESERVED, CallReservedFunctionality.class, callingFunctionality, rpcRequestJson, result -> result.as(RpcResponse.class));
    }

    public static final CompletableFuture callRestricted(RpcRequest rpcRequest) {
        return call(CALL_RESTRICTED, CallRestrictedFunctionality.class, getCallingFunctionality(), rpcRequest, result -> result.as(RpcResponse.class));
    }

    public static final CompletableFuture callRestricted(Functionality functionality, RpcRequest rpcRequest) {
        return call(CALL_RESTRICTED, CallRestrictedFunctionality.class, functionality, rpcRequest, result -> result.as(RpcResponse.class));
    }

    public static final CompletableFuture callRestrictedFromJson(String rpcRequestJson) {
        return callFromJson(CALL_RESTRICTED, CallRestrictedFunctionality.class, getCallingFunctionality(), rpcRequestJson, result -> result.as(RpcResponse.class));
    }

    public static final CompletableFuture callRestrictedFromJson(Functionality callingFunctionality, String rpcRequestJson) {
        return callFromJson(CALL_RESTRICTED, CallRestrictedFunctionality.class, callingFunctionality, rpcRequestJson, result -> result.as(RpcResponse.class));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy