Class RegistrationWebEndpointMappingFactory<R extends jakarta.servlet.Registration>
java.lang.Object
io.microsphere.spring.web.metadata.AbstractWebEndpointMappingFactory<String>
io.microsphere.spring.web.metadata.RegistrationWebEndpointMappingFactory<R>
- Type Parameters:
R
- The type ofRegistrationWebEndpointMappingFactory
- All Implemented Interfaces:
WebEndpointMappingFactory<String>
- Direct Known Subclasses:
FilterRegistrationWebEndpointMappingFactory
,ServletRegistrationWebEndpointMappingFactory
public abstract class RegistrationWebEndpointMappingFactory<R extends jakarta.servlet.Registration>
extends AbstractWebEndpointMappingFactory<String>
The abstract class of
AbstractWebEndpointMappingFactory
for Servlet Registration
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
Field Summary
FieldsFields inherited from class io.microsphere.spring.web.metadata.AbstractWebEndpointMappingFactory
logger
-
Constructor Summary
ConstructorsConstructorDescriptionRegistrationWebEndpointMappingFactory
(jakarta.servlet.ServletContext servletContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
contribute
(String endpoint, jakarta.servlet.ServletContext servletContext, WebEndpointMapping.Builder<String> builder) Contribute theWebEndpointMapping.Builder
to create an instance ofWebEndpointMapping
protected final WebEndpointMapping<String>
protected abstract Collection<String>
getPatterns
(R registration) Get the patterns ofRegistration
protected abstract R
getRegistration
(String name, jakarta.servlet.ServletContext servletContext) final boolean
Current factory supports the specified endpoint or notMethods inherited from class io.microsphere.spring.web.metadata.AbstractWebEndpointMappingFactory
create
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.microsphere.spring.web.metadata.WebEndpointMappingFactory
getSourceType
-
Field Details
-
servletContext
protected final jakarta.servlet.ServletContext servletContext
-
-
Constructor Details
-
RegistrationWebEndpointMappingFactory
public RegistrationWebEndpointMappingFactory(jakarta.servlet.ServletContext servletContext)
-
-
Method Details
-
supports
Description copied from interface:WebEndpointMappingFactory
Current factory supports the specified endpoint or not- Parameters:
endpoint
- could be one of these :ServletRegistration
FilterRegistration
org.springframework.web.servlet.mvc.method.RequestMappingInfo
org.springframework.web.reactive.result.method.RequestMappingInfo
- Returns:
true
if supports,false
otherwise
-
doCreate
- Specified by:
doCreate
in classAbstractWebEndpointMappingFactory<String>
- Throws:
Throwable
-
getRegistration
@Nonnull protected abstract R getRegistration(String name, jakarta.servlet.ServletContext servletContext) - Parameters:
name
- the name ofRegistration
servletContext
-ServletContext
- Returns:
- The
Registration
-
getPatterns
Get the patterns ofRegistration
- Parameters:
registration
-Registration
- Returns:
- non-null
-
contribute
protected void contribute(String endpoint, jakarta.servlet.ServletContext servletContext, WebEndpointMapping.Builder<String> builder) throws Throwable Contribute theWebEndpointMapping.Builder
to create an instance ofWebEndpointMapping
- Parameters:
endpoint
- the name ofRegistration
servletContext
-ServletContext
builder
-WebEndpointMapping.Builder
- Throws:
Throwable
- an error if contribution failed
-