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
ConstructorsConstructorDescriptionIncludeExcludeEndpointFilter(Class<E> endpointType, Collection<String> include, Collection<String> exclude, String... defaultIncludes) Create a newIncludeExcludeEndpointFilterwith specific include/exclude rules.IncludeExcludeEndpointFilter(Class<E> endpointType, Environment environment, String prefix, String... defaultIncludes) Create a newIncludeExcludeEndpointFilterwith include/exclude rules bound from theEnvironment. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturntrueif the filter matches.final booleanmatch(EndpointId endpointId) Returntrueif the filter matches.
-
Constructor Details
-
IncludeExcludeEndpointFilter
public IncludeExcludeEndpointFilter(Class<E> endpointType, Environment environment, String prefix, String... defaultIncludes) Create a newIncludeExcludeEndpointFilterwith 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 defaultincludesto use when none are specified.
-
IncludeExcludeEndpointFilter
public IncludeExcludeEndpointFilter(Class<E> endpointType, Collection<String> include, Collection<String> exclude, String... defaultIncludes) Create a newIncludeExcludeEndpointFilterwith 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 defaultincludesto use when none are specified.
-
-
Method Details
-
match
Description copied from interface:EndpointFilterReturntrueif the filter matches.- Specified by:
matchin interfaceEndpointFilter<E extends ExposableEndpoint<?>>- Parameters:
endpoint- the endpoint to check- Returns:
trueif the filter matches
-
match
Returntrueif the filter matches.- Parameters:
endpointId- the endpoint ID to check- Returns:
trueif the filter matches- Since:
- 2.6.0
-