Class ServiceValidateUtil


  • public class ServiceValidateUtil
    extends java.lang.Object
    Herts service validation utility
    • Field Detail

    • Constructor Detail

      • ServiceValidateUtil

        public ServiceValidateUtil()
    • 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 List
        serviceNames - 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