com.metaring.framework.rpc.CallFunctionality Maven / Gradle / Ivy
package com.metaring.framework.rpc;
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 CallFunctionality extends AbstractFunctionality implements GeneratedFunctionality {
static final FunctionalityInfo INFO = FunctionalityInfo.create("com.metaring.framework.rpc.call", true, false, false, "com.metaring.framework.rpc.RpcRequest", "com.metaring.framework.rpc.RpcResponse");
static final CallFunctionality INSTANCE = new CallFunctionalityImpl();
protected CallFunctionality() {
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