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>
EndpointFilter that will filter endpoints based on include and exclude patterns.
Since:
2.2.7
Author:
Phillip Webb
  • Constructor Details

    • IncludeExcludeEndpointFilter

      public IncludeExcludeEndpointFilter(Class<E> endpointType, Environment environment, String prefix, String... defaultIncludes)
      Create a new IncludeExcludeEndpointFilter with include/exclude rules bound from the Environment.
      Parameters:
      endpointType - the endpoint type that should be considered (other types always match)
      environment - the environment containing the properties
      prefix - the property prefix to bind
      defaultIncludes - the default includes to use when none are specified.
    • IncludeExcludeEndpointFilter

      public IncludeExcludeEndpointFilter(Class<E> endpointType, Collection<String> include, Collection<String> exclude, String... defaultIncludes)
      Create a new IncludeExcludeEndpointFilter with specific include/exclude rules.
      Parameters:
      endpointType - the endpoint type that should be considered (other types always match)
      include - the include patterns
      exclude - the exclude patterns
      defaultIncludes - the default includes to use when none are specified.
  • Method Details

    • match

      public boolean match(E endpoint)
      Description copied from interface: EndpointFilter
      Return true if the filter matches.
      Specified by:
      match in interface EndpointFilter<E extends ExposableEndpoint<?>>
      Parameters:
      endpoint - the endpoint to check
      Returns:
      true if the filter matches
    • match

      public final boolean match(EndpointId endpointId)
      Return true if the filter matches.
      Parameters:
      endpointId - the endpoint ID to check
      Returns:
      true if the filter matches
      Since:
      2.6.0