Class WebEndpointMapping<E>
java.lang.Object
io.microsphere.spring.web.metadata.WebEndpointMapping<E>
- Type Parameters:
E- the type of endpoint
The meta-data class for Web Endpoint Mapping that could be one of these endpoints:
ServletServlet's Filter- Spring WebMVC
DispatcherServlet - Spring WebFlux
DispatcherHandler - Customized
The method getKind() can be used to identify the kind of endpoints, and the method
getEndpoint() is an abstract presentation of actual endpoint that may be :
the name of Servletthe name of Servlet's Filter- the any handler of Spring WebMVC
org.springframework.web.servlet.HandlerMapping:- The
Stringpresenting the name of Handler bean - The
org.springframework.web.servlet.mvc.ControllerBean - The
HandlerMethodcould be annotated the@RequestMapping - The
org.springframework.web.servlet.function.HandlerFunctionsince Spring Framework 5.2
- The
- the any handler of Spring WebFlux
org.springframework.web.reactive.HandlerMapping:- The
Stringpresenting the name of Handler bean - The
HandlerMethodcould be annotated the@RequestMapping - The
org.springframework.web.reactive.function.server.RouterFunctionsince Spring Framework 5.0
- The
The method getSource() can trace the source of WebEndpointMapping if present, it could be :
ServletContext- Spring WebMVC
org.springframework.web.servlet.HandlerMapping - Spring WebFlux
org.springframework.web.reactive.HandlerMapping
non-source- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
ServletRegistrationFilterRegistrationWebServletWebFilterorg.springframework.web.servlet.DispatcherServletorg.springframework.web.reactive.DispatcherHandlerorg.springframework.web.servlet.HandlerMappingorg.springframework.web.reactive.HandlerMappingRequestMappingorg.springframework.web.servlet.mvc.method.RequestMappingInfoorg.springframework.web.reactive.result.method.RequestMappingInfo
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean<V> VgetAttribute(String name) String[]The abstract presentation of actual endpoint that may be :the name of Servletthe name of Servlet's Filterthe any handler of Spring WebMVCorg.springframework.web.servlet.HandlerMapping: TheStringpresenting the name of Handler bean Theorg.springframework.web.servlet.mvc.ControllerBean TheHandlerMethodcould be annotated the@RequestMappingTheorg.springframework.web.servlet.function.HandlerFunctionsince Spring Framework 5.2 the any handler of Spring WebFluxorg.springframework.web.reactive.DispatcherHandler: TheStringpresenting the name of Handler bean TheHandlerMethodcould be annotated the@RequestMappingTheorg.springframework.web.reactive.function.server.RouterFunctionsince Spring Framework 5.0String[]intgetId()The id of endpointgetKind()The kind of endpoint:ServletServlet's FilterSpring WebMVCDispatcherServletSpring WebFluxDispatcherHandlerCustomizedString[]String[]String[]String[]The source ofWebEndpointMappingif present, it could be :ServletContextSpring WebMVCorg.springframework.web.servlet.HandlerMappingSpring WebFluxorg.springframework.web.reactive.HandlerMapping, or it'snon-sourceinthashCode()static <E> WebEndpointMapping.Builder<E>static <E> WebEndpointMapping.Builder<E>of(E endpoint, Collection<String> patterns) static <E> WebEndpointMapping.Builderof(WebEndpointMapping.Kind kind, E endpoint, String... patterns) static <E> WebEndpointMapping.Builder<E>of(WebEndpointMapping.Kind kind, E endpoint, Collection<String> patterns) static WebEndpointMapping.Builder<?>static WebEndpointMapping.Builder<?>of(Collection<String> patterns) <V> WebEndpointMapping<E>setAttribute(String name, V value) toJSON()toString()
-
Field Details
-
ID_HEADER_NAME
The HTTP header name forgetId()- See Also:
-
NON_ENDPOINT
-
NON_SOURCE
-
-
Method Details
-
of
-
of
-
of
public static <E> WebEndpointMapping.Builder<E> of(@Nullable E endpoint, Collection<String> patterns) -
of
-
of
public static <E> WebEndpointMapping.Builder<E> of(@Nullable WebEndpointMapping.Kind kind, @Nullable E endpoint, Collection<String> patterns) -
of
public static <E> WebEndpointMapping.Builder of(@Nullable WebEndpointMapping.Kind kind, @Nullable E endpoint, String... patterns) -
getKind
The kind of endpoint:ServletServlet's Filter- Spring WebMVC
DispatcherServlet - Spring WebFlux
DispatcherHandler - Customized
- Returns:
- non-null
-
getEndpoint
The abstract presentation of actual endpoint that may be :the name of Servletthe name of Servlet's Filter- the any handler of Spring WebMVC
org.springframework.web.servlet.HandlerMapping:- The
Stringpresenting the name of Handler bean - The
org.springframework.web.servlet.mvc.ControllerBean - The
HandlerMethodcould be annotated the@RequestMapping - The
org.springframework.web.servlet.function.HandlerFunctionsince Spring Framework 5.2
- The
- the any handler of Spring WebFlux
org.springframework.web.reactive.DispatcherHandler:- The
Stringpresenting the name of Handler bean - The
HandlerMethodcould be annotated the@RequestMapping - The
org.springframework.web.reactive.function.server.RouterFunctionsince Spring Framework 5.0
- The
- Returns:
- non-null
-
getId
public int getId()The id of endpoint- Returns:
- 0 if
no endpoint present
-
getSource
The source ofWebEndpointMappingif present, it could be :ServletContext- Spring WebMVC
org.springframework.web.servlet.HandlerMapping - Spring WebFlux
org.springframework.web.reactive.HandlerMapping
non-source- Returns:
- non-null
-
getPatterns
-
getMethods
-
getParams
-
getHeaders
-
getConsumes
-
getProduces
-
setAttribute
-
getAttribute
-
toJSON
-
equals
-
hashCode
public int hashCode() -
toString
-