com.metaring.framework.rpc.auth.CallRestrictedFunctionality Maven / Gradle / Ivy
package com.metaring.framework.rpc.auth;
import java.util.concurrent.CompletableFuture;
import com.metaring.framework.functionality.AbstractFunctionality;
import com.metaring.framework.functionality.GeneratedFunctionality;
import com.metaring.framework.functionality.FunctionalityInfo;
import com.metaring.framework.rpc.RpcRequest;
import com.metaring.framework.rpc.RpcResponse;
abstract class CallRestrictedFunctionality extends AbstractFunctionality implements GeneratedFunctionality {
static final FunctionalityInfo INFO = FunctionalityInfo.create("com.metaring.framework.rpc.auth.callRestricted", true, true, false, "com.metaring.framework.rpc.RpcRequest", "com.metaring.framework.rpc.RpcResponse");
static final CallRestrictedFunctionality INSTANCE = new CallRestrictedFunctionalityImpl();
protected CallRestrictedFunctionality() {
super(INFO, RpcResponse.class);
}
@Override
protected final CompletableFuture beforePreConditionCheck(Object input) throws Exception {
CompletableFuture response = beforePreConditionCheck(input == null ? null : (RpcRequest) input);
return response == null ? end : response;
}
protected CompletableFuture beforePreConditionCheck(RpcRequest input) throws Exception {
return end;
}
@Override
protected final CompletableFuture preConditionCheck(Object input) throws Exception {
CompletableFuture response = preConditionCheck(input == null ? null : (RpcRequest) input);
return response == null ? end : response;
}
protected abstract CompletableFuture preConditionCheck(RpcRequest input) throws Exception;
@Override
protected final CompletableFuture afterPreConditionCheck(Object input) throws Exception {
CompletableFuture response = afterPreConditionCheck(input == null ? null : (RpcRequest) input);
return response == null ? end : response;
}
protected CompletableFuture afterPreConditionCheck(RpcRequest input) throws Exception {
return end;
}
@Override
protected final CompletableFuture beforeCall(Object input) throws Exception {
CompletableFuture response = beforeCall(input == null ? null : (RpcRequest) input);
return response == null ? end : response;
}
protected CompletableFuture beforeCall(RpcRequest input) throws Exception {
return end;
}
@Override
protected final CompletableFuture