Class SpringMvcClientEventListener

  • All Implemented Interfaces:
    java.util.EventListener, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>

    public class SpringMvcClientEventListener
    extends org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,​ShenyuSpringMvcClient>
    The type Shenyu spring mvc client event listener.
    • Field Summary

      • Fields inherited from class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener

        PATH_SEPARATOR
    • Constructor Summary

      Constructors 
      Constructor Description
      SpringMvcClientEventListener​(org.apache.shenyu.register.common.config.PropertiesConfig clientConfig, org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository shenyuClientRegisterRepository)
      Instantiates a new context refreshed event listener.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.javatuples.Sextet<java.lang.String[],​java.lang.String,​java.lang.String,​org.apache.shenyu.common.enums.ApiHttpMethodEnum[],​org.apache.shenyu.common.enums.RpcTypeEnum,​java.lang.String> buildApiDocSextet​(java.lang.reflect.Method method, java.lang.annotation.Annotation annotation, java.util.Map<java.lang.String,​java.lang.Object> beans)  
      protected java.lang.String buildApiPath​(java.lang.reflect.Method method, java.lang.String superPath, ShenyuSpringMvcClient methodShenyuClient)  
      protected java.lang.String buildApiSuperPath​(java.lang.Class<?> clazz, ShenyuSpringMvcClient beanShenyuClient)  
      protected org.apache.shenyu.register.common.dto.MetaDataRegisterDTO buildMetaDataDTO​(java.lang.Object bean, ShenyuSpringMvcClient shenyuClient, java.lang.String path, java.lang.Class<?> clazz, java.lang.reflect.Method method)  
      protected org.apache.shenyu.register.common.dto.URIRegisterDTO buildURIRegisterDTO​(org.springframework.context.ApplicationContext context, java.util.Map<java.lang.String,​java.lang.Object> beans)  
      protected java.lang.Class<ShenyuSpringMvcClient> getAnnotationType()  
      protected java.util.Map<java.lang.String,​java.lang.Object> getBeans​(org.springframework.context.ApplicationContext context)  
      protected void handleMethod​(java.lang.Object bean, java.lang.Class<?> clazz, ShenyuSpringMvcClient beanShenyuClient, java.lang.reflect.Method method, java.lang.String superPath)  
      • Methods inherited from class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener

        getAppName, getContextPath, getCorrectedClass, getHost, getIpAndPort, getPort, getPublisher, handle, handleClass, onApplicationEvent, pathJoin
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringMvcClientEventListener

        public SpringMvcClientEventListener​(org.apache.shenyu.register.common.config.PropertiesConfig clientConfig,
                                            org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository shenyuClientRegisterRepository)
        Instantiates a new context refreshed event listener.
        Parameters:
        clientConfig - the shenyu client config
        shenyuClientRegisterRepository - the shenyuClientRegisterRepository
    • Method Detail

      • buildApiDocSextet

        protected org.javatuples.Sextet<java.lang.String[],​java.lang.String,​java.lang.String,​org.apache.shenyu.common.enums.ApiHttpMethodEnum[],​org.apache.shenyu.common.enums.RpcTypeEnum,​java.lang.String> buildApiDocSextet​(java.lang.reflect.Method method,
                                                                                                                                                                                                                                                             java.lang.annotation.Annotation annotation,
                                                                                                                                                                                                                                                             java.util.Map<java.lang.String,​java.lang.Object> beans)
        Specified by:
        buildApiDocSextet in class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,​ShenyuSpringMvcClient>
      • getBeans

        protected java.util.Map<java.lang.String,​java.lang.Object> getBeans​(org.springframework.context.ApplicationContext context)
        Specified by:
        getBeans in class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,​ShenyuSpringMvcClient>
      • buildURIRegisterDTO

        protected org.apache.shenyu.register.common.dto.URIRegisterDTO buildURIRegisterDTO​(org.springframework.context.ApplicationContext context,
                                                                                           java.util.Map<java.lang.String,​java.lang.Object> beans)
        Specified by:
        buildURIRegisterDTO in class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,​ShenyuSpringMvcClient>
      • buildApiSuperPath

        protected java.lang.String buildApiSuperPath​(java.lang.Class<?> clazz,
                                                     @Nullable
                                                     ShenyuSpringMvcClient beanShenyuClient)
        Specified by:
        buildApiSuperPath in class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,​ShenyuSpringMvcClient>
      • getAnnotationType

        protected java.lang.Class<ShenyuSpringMvcClient> getAnnotationType()
        Specified by:
        getAnnotationType in class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,​ShenyuSpringMvcClient>
      • handleMethod

        protected void handleMethod​(java.lang.Object bean,
                                    java.lang.Class<?> clazz,
                                    @Nullable
                                    ShenyuSpringMvcClient beanShenyuClient,
                                    java.lang.reflect.Method method,
                                    java.lang.String superPath)
        Overrides:
        handleMethod in class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,​ShenyuSpringMvcClient>
      • buildApiPath

        protected java.lang.String buildApiPath​(java.lang.reflect.Method method,
                                                java.lang.String superPath,
                                                @NonNull
                                                ShenyuSpringMvcClient methodShenyuClient)
        Specified by:
        buildApiPath in class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,​ShenyuSpringMvcClient>
      • buildMetaDataDTO

        protected org.apache.shenyu.register.common.dto.MetaDataRegisterDTO buildMetaDataDTO​(java.lang.Object bean,
                                                                                             @NonNull
                                                                                             ShenyuSpringMvcClient shenyuClient,
                                                                                             java.lang.String path,
                                                                                             java.lang.Class<?> clazz,
                                                                                             java.lang.reflect.Method method)
        Specified by:
        buildMetaDataDTO in class org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,​ShenyuSpringMvcClient>