Class IncludeExcludeEndpointFilter<E extends ExposableEndpoint<?>>
java.lang.Object
org.springframework.boot.actuate.autoconfigure.endpoint.expose.IncludeExcludeEndpointFilter<E>
- Type Parameters:
E
- the endpoint type
- All Implemented Interfaces:
EndpointFilter<E>
public class IncludeExcludeEndpointFilter<E extends ExposableEndpoint<?>>
extends Object
implements EndpointFilter<E>
- Since:
- 2.2.7
- Author:
- Phillip Webb
-
Constructor Summary
ConstructorDescriptionIncludeExcludeEndpointFilter
(Class<E> endpointType, Collection<String> include, Collection<String> exclude, String... defaultIncludes) Create a newIncludeExcludeEndpointFilter
with specific include/exclude rules.IncludeExcludeEndpointFilter
(Class<E> endpointType, Environment environment, String prefix, String... defaultIncludes) Create a newIncludeExcludeEndpointFilter
with include/exclude rules bound from theEnvironment
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returntrue
if the filter matches.final boolean
match
(EndpointId endpointId) Returntrue
if the filter matches.
-
Constructor Details
-
IncludeExcludeEndpointFilter
public IncludeExcludeEndpointFilter(Class<E> endpointType, Environment environment, String prefix, String... defaultIncludes) Create a newIncludeExcludeEndpointFilter
with include/exclude rules bound from theEnvironment
.- Parameters:
endpointType
- the endpoint type that should be considered (other types always match)environment
- the environment containing the propertiesprefix
- the property prefix to binddefaultIncludes
- the defaultincludes
to use when none are specified.
-
IncludeExcludeEndpointFilter
public IncludeExcludeEndpointFilter(Class<E> endpointType, Collection<String> include, Collection<String> exclude, String... defaultIncludes) Create a newIncludeExcludeEndpointFilter
with specific include/exclude rules.- Parameters:
endpointType
- the endpoint type that should be considered (other types always match)include
- the include patternsexclude
- the exclude patternsdefaultIncludes
- the defaultincludes
to use when none are specified.
-
-
Method Details
-
match
Description copied from interface:EndpointFilter
Returntrue
if the filter matches.- Specified by:
match
in interfaceEndpointFilter<E extends ExposableEndpoint<?>>
- Parameters:
endpoint
- the endpoint to check- Returns:
true
if the filter matches
-
match
Returntrue
if the filter matches.- Parameters:
endpointId
- the endpoint ID to check- Returns:
true
if the filter matches- Since:
- 2.6.0
-