Class SpringMvcClientEventListener
- java.lang.Object
-
- org.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,ShenyuSpringMvcClient>
-
- org.apache.shenyu.client.springmvc.init.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.
-
-
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.StringbuildApiPath(java.lang.reflect.Method method, java.lang.String superPath, ShenyuSpringMvcClient methodShenyuClient)protected java.lang.StringbuildApiSuperPath(java.lang.Class<?> clazz, ShenyuSpringMvcClient beanShenyuClient)protected org.apache.shenyu.register.common.dto.MetaDataRegisterDTObuildMetaDataDTO(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.URIRegisterDTObuildURIRegisterDTO(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 voidhandleMethod(java.lang.Object bean, java.lang.Class<?> clazz, ShenyuSpringMvcClient beanShenyuClient, java.lang.reflect.Method method, java.lang.String superPath)
-
-
-
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 configshenyuClientRegisterRepository- 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:
buildApiDocSextetin classorg.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:
getBeansin classorg.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:
buildURIRegisterDTOin classorg.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:
buildApiSuperPathin classorg.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,ShenyuSpringMvcClient>
-
getAnnotationType
protected java.lang.Class<ShenyuSpringMvcClient> getAnnotationType()
- Specified by:
getAnnotationTypein classorg.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:
handleMethodin classorg.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:
buildApiPathin classorg.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:
buildMetaDataDTOin classorg.apache.shenyu.client.core.client.AbstractContextRefreshedEventListener<java.lang.Object,ShenyuSpringMvcClient>
-
-