Class EndpointRequest.LinksRequestMatcher
java.lang.Object
org.springframework.boot.security.web.servlet.ApplicationContextRequestMatcher<WebApplicationContext>
org.springframework.boot.security.autoconfigure.actuate.web.servlet.EndpointRequest.LinksRequestMatcher
- All Implemented Interfaces:
RequestMatcher
- Enclosing class:
EndpointRequest
public static final class EndpointRequest.LinksRequestMatcher
extends ApplicationContextRequestMatcher<WebApplicationContext>
The request matcher used to match against the links endpoint.
- Since:
- 4.0.0
- Author:
- Madhura Bhave, Phillip Webb, Chris Bono
-
Nested Class Summary
Nested classes/interfaces inherited from interface RequestMatcher
RequestMatcher.MatchResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RequestMatchercreateDelegate(WebApplicationContext context, org.springframework.boot.security.autoconfigure.actuate.web.servlet.EndpointRequest.RequestMatcherFactory requestMatcherFactory) protected final List<RequestMatcher> getDelegateMatchers(org.springframework.boot.security.autoconfigure.actuate.web.servlet.EndpointRequest.RequestMatcherFactory requestMatcherFactory, RequestMatcherProvider matcherProvider, Set<String> paths, @Nullable HttpMethod httpMethod) protected EndpointIdgetEndpointId(Object source) protected List<RequestMatcher> getLinksMatchers(org.springframework.boot.security.autoconfigure.actuate.web.servlet.EndpointRequest.RequestMatcherFactory requestMatcherFactory, RequestMatcherProvider matcherProvider, String basePath) protected RequestMatcherProviderprotected final booleanhasWebServerNamespace(ApplicationContext applicationContext, WebServerNamespace webServerNamespace) protected booleanignoreApplicationContext(WebApplicationContext applicationContext) Returns if theWebApplicationContextshould be ignored and not used for matching.protected booleanignoreApplicationContext(WebApplicationContext applicationContext, ManagementPortType managementPortType) protected final voidinitialized(Supplier<WebApplicationContext> context) Method that can be implemented by subclasses that wish to initialize items the first time that the matcher is called.protected final booleanmatches(HttpServletRequest request, Supplier<WebApplicationContext> context) Decides whether the rule implemented by the strategy matches the supplied request.toString()protected StringMethods inherited from class ApplicationContextRequestMatcher
matchesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface RequestMatcher
matcher
-
Constructor Details
-
LinksRequestMatcher
public LinksRequestMatcher()
-
-
Method Details
-
createDelegate
protected RequestMatcher createDelegate(WebApplicationContext context, org.springframework.boot.security.autoconfigure.actuate.web.servlet.EndpointRequest.RequestMatcherFactory requestMatcherFactory) -
toString
-
ignoreApplicationContext
Description copied from class:ApplicationContextRequestMatcherReturns if theWebApplicationContextshould be ignored and not used for matching. If this method returnstruethen the context will not be used and thematchesmethod will returnfalse.- Overrides:
ignoreApplicationContextin classApplicationContextRequestMatcher<WebApplicationContext>- Parameters:
applicationContext- the candidate web application context- Returns:
- if the application context should be ignored
-
ignoreApplicationContext
protected boolean ignoreApplicationContext(WebApplicationContext applicationContext, ManagementPortType managementPortType) -
hasWebServerNamespace
protected final boolean hasWebServerNamespace(ApplicationContext applicationContext, WebServerNamespace webServerNamespace) -
initialized
Description copied from class:ApplicationContextRequestMatcherMethod that can be implemented by subclasses that wish to initialize items the first time that the matcher is called. This method will be called only once and only ifApplicationContextRequestMatcher.ignoreApplicationContext(WebApplicationContext)returnsfalse. Note that the supplied context will be based on the first request sent to the matcher.- Overrides:
initializedin classApplicationContextRequestMatcher<WebApplicationContext>- Parameters:
context- a supplier for the initialized context (may throw an exception)- See Also:
-
matches
protected final boolean matches(HttpServletRequest request, Supplier<WebApplicationContext> context) Description copied from class:ApplicationContextRequestMatcherDecides whether the rule implemented by the strategy matches the supplied request.- Specified by:
matchesin classApplicationContextRequestMatcher<WebApplicationContext>- Parameters:
request- the source requestcontext- a supplier for the initialized context (may throw an exception)- Returns:
- if the request matches
-
getDelegateMatchers
protected final List<RequestMatcher> getDelegateMatchers(org.springframework.boot.security.autoconfigure.actuate.web.servlet.EndpointRequest.RequestMatcherFactory requestMatcherFactory, RequestMatcherProvider matcherProvider, Set<String> paths, @Nullable HttpMethod httpMethod) -
getLinksMatchers
protected List<RequestMatcher> getLinksMatchers(org.springframework.boot.security.autoconfigure.actuate.web.servlet.EndpointRequest.RequestMatcherFactory requestMatcherFactory, RequestMatcherProvider matcherProvider, String basePath) -
getRequestMatcherProvider
-
toString
-
getEndpointId
-