Package org.hertsstack.core.util
Class ServiceValidateUtil
- java.lang.Object
-
- org.hertsstack.core.util.ServiceValidateUtil
-
public class ServiceValidateUtil extends java.lang.Object
Herts service validation utility
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
voidReturnName
-
Constructor Summary
Constructors Constructor Description ServiceValidateUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isAllHttpType(java.util.List<HertsType> serviceTypes)
Check http typestatic boolean
isAllHttpTypeByService(java.util.List<HertsService> coreServices)
Check http typestatic boolean
isAllReturnVoid(java.util.List<HertsService> hertsServices)
Check method type of all services.static boolean
isAllReturnVoidBy(java.util.List<HertsReceiver> hertsReceivers)
Check method type of all receiver services.static boolean
isSameHertsCoreType(java.util.List<HertsType> coreTypes)
Check registered hert typestatic boolean
isStreamingRpc(java.util.List<java.lang.Class<?>> classTypes)
Check streaming rpc methodstatic boolean
isValidStreamingRpc(java.util.List<HertsService> services)
Check streaming rpc preconditionstatic java.lang.String
validateMethod(java.util.List<java.lang.Class<?>> classes)
Check method conditionstatic java.lang.String
validateMethods(java.lang.reflect.Method[] methods, java.util.List<java.lang.String> serviceNames)
Check method conditionstatic java.lang.String
validateRegisteredServices(java.util.List<HertsService> services)
Check registered service
-
-
-
Field Detail
-
voidReturnName
protected static final java.lang.String voidReturnName
- See Also:
- Constant Field Values
-
-
Method Detail
-
isSameHertsCoreType
public static boolean isSameHertsCoreType(java.util.List<HertsType> coreTypes)
Check registered hert type- Parameters:
coreTypes
- herts types- Returns:
- Result
-
validateRegisteredServices
public static java.lang.String validateRegisteredServices(java.util.List<HertsService> services)
Check registered service- Parameters:
services
- HertsService list- Returns:
- Result
-
validateMethod
public static java.lang.String validateMethod(java.util.List<java.lang.Class<?>> classes)
Check method condition- Parameters:
classes
- Class of List- Returns:
- Result
-
validateMethods
public static java.lang.String validateMethods(java.lang.reflect.Method[] methods, java.util.List<java.lang.String> serviceNames)
Check method condition- Parameters:
methods
- Method of ListserviceNames
- Herts service name- Returns:
- Result
-
isStreamingRpc
public static boolean isStreamingRpc(java.util.List<java.lang.Class<?>> classTypes)
Check streaming rpc method- Parameters:
classTypes
- Class of List- Returns:
- Result
-
isValidStreamingRpc
public static boolean isValidStreamingRpc(java.util.List<HertsService> services)
Check streaming rpc precondition- Parameters:
services
- Herts service list- Returns:
- Result
-
isAllHttpType
public static boolean isAllHttpType(java.util.List<HertsType> serviceTypes)
Check http type- Parameters:
serviceTypes
- Herts service type list- Returns:
- Result
-
isAllHttpTypeByService
public static boolean isAllHttpTypeByService(java.util.List<HertsService> coreServices)
Check http type- Parameters:
coreServices
- Herts service list- Returns:
- Result
-
isAllReturnVoid
public static boolean isAllReturnVoid(java.util.List<HertsService> hertsServices)
Check method type of all services. If all method return type is void, return true- Parameters:
hertsServices
- HertsService list- Returns:
- Result
-
isAllReturnVoidBy
public static boolean isAllReturnVoidBy(java.util.List<HertsReceiver> hertsReceivers)
Check method type of all receiver services. If all method return type is void, return true- Parameters:
hertsReceivers
- HertsReceiver list- Returns:
- Result
-
-