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 voidcontribute(String endpoint, jakarta.servlet.ServletContext servletContext, WebEndpointMapping.Builder<String> builder) Contribute theWebEndpointMapping.Builderto create an instance ofWebEndpointMappingprotected final WebEndpointMapping<String>protected WebEndpointMapping.Kindprotected abstract Collection<String>getMethods(R registration) Gets the HTTP methods of the given registrationprotected abstract Collection<String>getPatterns(R registration) Get the patterns ofRegistrationprotected abstract RgetRegistration(String name, jakarta.servlet.ServletContext servletContext) final booleanCurrent factory supports the specified endpoint or notMethods inherited from class io.microsphere.spring.web.metadata.AbstractWebEndpointMappingFactory
createMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:WebEndpointMappingFactoryCurrent factory supports the specified endpoint or not- Parameters:
endpoint- could be one of these :ServletRegistrationFilterRegistrationorg.springframework.web.servlet.mvc.method.RequestMappingInfoorg.springframework.web.reactive.result.method.RequestMappingInfo
- Returns:
trueif supports,falseotherwise
-
doCreate
- Specified by:
doCreatein classAbstractWebEndpointMappingFactory<String>- Throws:
Throwable
-
getKind
-
getMethods
Gets the HTTP methods of the given registration- Parameters:
registration- the registration- Returns:
- the HTTP methods of the given registration
-
getRegistration
@Nonnull protected abstract R getRegistration(String name, jakarta.servlet.ServletContext servletContext) - Parameters:
name- the name ofRegistrationservletContext-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.Builderto create an instance ofWebEndpointMapping- Parameters:
endpoint- the name ofRegistrationservletContext-ServletContextbuilder-WebEndpointMapping.Builder- Throws:
Throwable- an error if contribution failed
-