public class RPCEndpointsBuilder extends Object
| Constructor and Description |
|---|
RPCEndpointsBuilder() |
| Modifier and Type | Method and Description |
|---|---|
static InterfaceSchema |
build(String interfaceName,
RPCType rpcType,
Object client,
List<String> skipEndpointsByName,
List<String> skipEndpointsByAnnotation,
List<String> involveEndpointsByName,
List<String> involveEndpointsByAnnotation,
List<AuthenticationDto> authenticationDtoList,
List<CustomizedRequestValueDto> customizedRequestValueDtos,
List<CustomizedNotNullAnnotationForRPCDto> notNullAnnotations) |
static void |
buildExternalServiceResponse(InterfaceSchema schema,
List<String> responseTypes,
RPCType rpcType)
attempt to identify class from the given client
|
static Map<Integer,LocalAuthSetupSchema> |
buildLocalAuthSetup(List<AuthenticationDto> authenticationDtoList)
build the local auth setup
|
static List<List<RPCActionDto>> |
buildSeededTest(Map<String,InterfaceSchema> rpcInterfaceSchema,
List<SeededRPCTestDto> seedRPCTests,
RPCType rpcType) |
static void |
validateCustomizedNotNullAnnotationForRPCDto(List<CustomizedNotNullAnnotationForRPCDto> notNullAnnotations)
validate specified notNullAnnotations
|
static void |
validateCustomizedValueInRequests(List<CustomizedRequestValueDto> customizedRequestValueDtos)
validate CustomizedRequestValueDto, eg,
1) for any CustomizedRequestValueDto, keyValuePairs and keyValues could not be specified or null at the same time
2) for keyValuePairs, if annotationOnEndpoint or specificEndpointName or specificRequestTypeName are specified, they should have consistent keys
3) keyValues with respect to any specific annotationOnEndpoint or specificEndpointName or specificRequestTypeName should be specified only one time
|
public static void validateCustomizedValueInRequests(List<CustomizedRequestValueDto> customizedRequestValueDtos)
customizedRequestValueDtos - are customized info to be checkedpublic static void validateCustomizedNotNullAnnotationForRPCDto(List<CustomizedNotNullAnnotationForRPCDto> notNullAnnotations)
notNullAnnotations - are specified customized annotation representing if any field of RPC dto is requiredpublic static void buildExternalServiceResponse(InterfaceSchema schema, List<String> responseTypes, RPCType rpcType)
schema - is the interface schema which might request the responses from the external serviceresponseTypes - are a list of types to identifyrpcType - is the rpc typepublic static InterfaceSchema build(String interfaceName, RPCType rpcType, Object client, List<String> skipEndpointsByName, List<String> skipEndpointsByAnnotation, List<String> involveEndpointsByName, List<String> involveEndpointsByAnnotation, List<AuthenticationDto> authenticationDtoList, List<CustomizedRequestValueDto> customizedRequestValueDtos, List<CustomizedNotNullAnnotationForRPCDto> notNullAnnotations)
interfaceName - the name of interfacerpcType - is the type of RPC, e.g., gRPC, Thriftclient - is the corresponding client to maniplute the interfaceskipEndpointsByName - specifies a list of names of endpoints to be skipped during testingskipEndpointsByAnnotation - specifies a list of annotations applied on endpoints that could be skipped during testinginvolveEndpointsByName - specifies a list of names of endpoints to be involved during testinginvolveEndpointsByAnnotation - specifies a list of annotations applied on endpoints that are involved during testingauthenticationDtoList - specifies a list of authentication infocustomizedRequestValueDtos - specifies a list of candidate values in requestspublic static Map<Integer,LocalAuthSetupSchema> buildLocalAuthSetup(List<AuthenticationDto> authenticationDtoList)
authenticationDtoList - a list of auth info specified by userpublic static List<List<RPCActionDto>> buildSeededTest(Map<String,InterfaceSchema> rpcInterfaceSchema, List<SeededRPCTestDto> seedRPCTests, RPCType rpcType)
Copyright © 2016–2023. All rights reserved.