类 WebEndpointMapping<E>
- java.lang.Object
-
- io.microsphere.spring.web.metadata.WebEndpointMapping<E>
-
- 类型参数:
E
- the type of endpoint
public class WebEndpointMapping<E> extends java.lang.Object
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 methodgetEndpoint()
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 ofWebEndpointMapping
if present, it could be :ServletContext
- Spring WebMVC
org.springframework.web.servlet.HandlerMapping
- Spring WebFlux
org.springframework.web.reactive.HandlerMapping
non-source
- 从以下版本开始:
- 1.0.0
- 作者:
- Mercy
- 另请参阅:
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
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
WebEndpointMapping.Builder<E>
static class
WebEndpointMapping.Kind
WebEndpointMapping
Kind
-
字段概要
字段 修饰符和类型 字段 说明 static java.lang.String
ID_HEADER_NAME
The HTTP header name forgetId()
static java.lang.Object
NON_ENDPOINT
static java.lang.Object
NON_SOURCE
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
equals(java.lang.Object o)
<V> V
getAttribute(java.lang.String name)
java.lang.String[]
getConsumes()
E
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 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.0java.lang.String[]
getHeaders()
int
getId()
The id of endpointWebEndpointMapping.Kind
getKind()
The kind of endpoint:Servlet
Servlet's Filter
Spring WebMVCDispatcherServlet
Spring WebFluxDispatcherHandler
Customizedjava.lang.String[]
getMethods()
java.lang.String[]
getParams()
java.lang.String[]
getPatterns()
java.lang.String[]
getProduces()
java.lang.Object
getSource()
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>
of(E endpoint, java.lang.String... patterns)
static <E> WebEndpointMapping.Builder<E>
of(E endpoint, java.util.Collection<java.lang.String> patterns)
static <E> WebEndpointMapping.Builder
of(WebEndpointMapping.Kind kind, E endpoint, java.lang.String... patterns)
static <E> WebEndpointMapping.Builder<E>
of(WebEndpointMapping.Kind kind, E endpoint, java.util.Collection<java.lang.String> patterns)
static WebEndpointMapping.Builder<?>
of(java.lang.String... patterns)
static WebEndpointMapping.Builder<?>
of(java.util.Collection<java.lang.String> patterns)
<V> WebEndpointMapping<E>
setAttribute(java.lang.String name, V value)
java.lang.String
toJSON()
java.lang.String
toString()
-
-
-
方法详细资料
-
of
public static WebEndpointMapping.Builder<?> of(java.util.Collection<java.lang.String> patterns)
-
of
public static WebEndpointMapping.Builder<?> of(java.lang.String... patterns)
-
of
public static <E> WebEndpointMapping.Builder<E> of(@Nullable E endpoint, java.util.Collection<java.lang.String> patterns)
-
of
public static <E> WebEndpointMapping.Builder<E> of(@Nullable E endpoint, java.lang.String... patterns)
-
of
public static <E> WebEndpointMapping.Builder<E> of(@Nullable WebEndpointMapping.Kind kind, @Nullable E endpoint, java.util.Collection<java.lang.String> patterns)
-
of
public static <E> WebEndpointMapping.Builder of(@Nullable WebEndpointMapping.Kind kind, @Nullable E endpoint, java.lang.String... patterns)
-
getKind
@NonNull public WebEndpointMapping.Kind getKind()
The kind of endpoint:Servlet
Servlet's Filter
- Spring WebMVC
DispatcherServlet
- Spring WebFlux
DispatcherHandler
- Customized
- 返回:
- non-null
-
getEndpoint
@NonNull public E 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
- 返回:
- non-null
-
getId
public int getId()
The id of endpoint- 返回:
- 0 if
no endpoint present
-
getSource
@NonNull public java.lang.Object 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
- 返回:
- non-null
-
getPatterns
@NonNull public java.lang.String[] getPatterns()
-
getMethods
@NonNull public java.lang.String[] getMethods()
-
getParams
@NonNull public java.lang.String[] getParams()
-
getHeaders
@NonNull public java.lang.String[] getHeaders()
-
getConsumes
@NonNull public java.lang.String[] getConsumes()
-
getProduces
@NonNull public java.lang.String[] getProduces()
-
setAttribute
public <V> WebEndpointMapping<E> setAttribute(java.lang.String name, @Nullable V value)
-
getAttribute
@Nullable public <V> V getAttribute(java.lang.String name)
-
toJSON
public java.lang.String toJSON()
-
equals
public boolean equals(java.lang.Object o)
- 覆盖:
equals
在类中java.lang.Object
-
hashCode
public int hashCode()
- 覆盖:
hashCode
在类中java.lang.Object
-
toString
public java.lang.String toString()
- 覆盖:
toString
在类中java.lang.Object
-
-