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 TypeMethodDescriptionstatic <E> WebEndpointMapping.Builder<E>booleanstatic <E> WebEndpointMapping.Builder<E>filter()<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.HandlerFunctionsince 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()booleanGet the 'negated' statusstatic <E> WebEndpointMapping.Builder<E>of(WebEndpointMapping.Kind kind) Create aWebEndpointMapping.BuilderofWebEndpointMappingwith specified kind.static <E> WebEndpointMapping.Builder<E>servlet()<V> WebEndpointMapping<E>setAttribute(String name, V value) toJSON()toString()static <E> WebEndpointMapping.Builder<E>webflux()static <E> WebEndpointMapping.Builder<E>webmvc()
-
Field Details
-
ID_HEADER_NAME
The HTTP header name forgetId()- See Also:
-
UNKNOWN_SOURCE
The source is unknown
-
-
Method Details
-
servlet
- Type Parameters:
E- the type of endpoint- Returns:
- a
WebEndpointMapping.BuilderofWebEndpointMapping - Throws:
IllegalArgumentException- if theendpointisnull
-
filter
- Type Parameters:
E- the type of endpoint- Returns:
- a
WebEndpointMapping.BuilderofWebEndpointMapping - Throws:
IllegalArgumentException- if theendpointisnull
-
webmvc
- Type Parameters:
E- the type of endpoint- Returns:
- a
WebEndpointMapping.BuilderofWebEndpointMapping - Throws:
IllegalArgumentException- if theendpointisnull
-
webflux
- Type Parameters:
E- the type of endpoint- Returns:
- a
WebEndpointMapping.BuilderofWebEndpointMapping - Throws:
IllegalArgumentException- if theendpointisnull
-
customized
@Nonnull public static <E> WebEndpointMapping.Builder<E> customized() throws IllegalArgumentException- Type Parameters:
E- the type of endpoint- Returns:
- a
WebEndpointMapping.BuilderofWebEndpointMapping - Throws:
IllegalArgumentException- if theendpointisnull
-
of
@Nonnull public static <E> WebEndpointMapping.Builder<E> of(@Nonnull WebEndpointMapping.Kind kind) throws IllegalArgumentException Create aWebEndpointMapping.BuilderofWebEndpointMappingwith specified kind.- Type Parameters:
E- the type of endpoint- Parameters:
kind- the kind of endpoint- Returns:
- a
WebEndpointMapping.BuilderofWebEndpointMapping - Throws:
IllegalArgumentException- if thekindorendpointisnull
-
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.HandlerFunctionsince Spring Framework 5.0
- The
- Returns:
- non-null
-
getId
public int getId()The id of endpoint- Returns:
- id of endpoint
-
isNegated
public boolean isNegated()Get the 'negated' status- Returns:
falseas default
-
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
-
equals
-
hashCode
public int hashCode() -
toString
-
toJSON
-