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:
Servlet
Servlet'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 Servlet
the name of Servlet's Filter
- the any handler of Spring WebMVC
org.springframework.web.servlet.HandlerMapping
:- The
String
presenting the name of Handler bean - The
org.springframework.web.servlet.mvc.Controller
Bean - The
HandlerMethod
could be annotated the@RequestMapping
- The
org.springframework.web.servlet.function.HandlerFunction
since Spring Framework 5.2
- The
- the any handler of Spring WebFlux
org.springframework.web.reactive.HandlerMapping
:- The
String
presenting the name of Handler bean - The
HandlerMethod
could be annotated the@RequestMapping
- The
org.springframework.web.reactive.function.server.RouterFunction
since 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:
-
ServletRegistration
FilterRegistration
WebServlet
WebFilter
org.springframework.web.servlet.DispatcherServlet
org.springframework.web.reactive.DispatcherHandler
org.springframework.web.servlet.HandlerMapping
org.springframework.web.reactive.HandlerMapping
RequestMapping
org.springframework.web.servlet.mvc.method.RequestMappingInfo
org.springframework.web.reactive.result.method.RequestMappingInfo
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
<V> V
getAttribute
(String name) String[]
The abstract presentation of actual endpoint that may be :the name of Servlet
the name of Servlet's Filter
the any handler of Spring WebMVCorg.springframework.web.servlet.HandlerMapping
: TheString
presenting the name of Handler bean Theorg.springframework.web.servlet.mvc.Controller
Bean TheHandlerMethod
could be annotated the@RequestMapping
Theorg.springframework.web.servlet.function.HandlerFunction
since Spring Framework 5.2 the any handler of Spring WebFluxorg.springframework.web.reactive.DispatcherHandler
: TheString
presenting the name of Handler bean TheHandlerMethod
could be annotated the@RequestMapping
Theorg.springframework.web.reactive.function.server.RouterFunction
since Spring Framework 5.0String[]
int
getId()
The id of endpointgetKind()
The kind of endpoint:Servlet
Servlet's Filter
Spring WebMVCDispatcherServlet
Spring WebFluxDispatcherHandler
CustomizedString[]
String[]
String[]
String[]
The source ofWebEndpointMapping
if present, it could be :ServletContext
Spring WebMVCorg.springframework.web.servlet.HandlerMapping
Spring WebFluxorg.springframework.web.reactive.HandlerMapping
, or it'snon-source
int
hashCode()
static <E> WebEndpointMapping.Builder<E>
static <E> WebEndpointMapping.Builder<E>
of
(E endpoint, Collection<String> patterns) static <E> WebEndpointMapping.Builder
of
(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:Servlet
Servlet'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 Servlet
the name of Servlet's Filter
- the any handler of Spring WebMVC
org.springframework.web.servlet.HandlerMapping
:- The
String
presenting the name of Handler bean - The
org.springframework.web.servlet.mvc.Controller
Bean - The
HandlerMethod
could be annotated the@RequestMapping
- The
org.springframework.web.servlet.function.HandlerFunction
since Spring Framework 5.2
- The
- the any handler of Spring WebFlux
org.springframework.web.reactive.DispatcherHandler
:- The
String
presenting the name of Handler bean - The
HandlerMethod
could be annotated the@RequestMapping
- The
org.springframework.web.reactive.function.server.RouterFunction
since 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 ofWebEndpointMapping
if 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
-