Class PathMappedEndpoints

java.lang.Object
org.springframework.boot.actuate.endpoint.web.PathMappedEndpoints
All Implemented Interfaces:
Iterable<PathMappedEndpoint>

public class PathMappedEndpoints extends Object implements Iterable<PathMappedEndpoint>
A collection of path mapped endpoints.
Since:
2.0.0
Author:
Phillip Webb
  • Constructor Details

    • PathMappedEndpoints

      public PathMappedEndpoints(String basePath, EndpointsSupplier<?> supplier)
      Create a new PathMappedEndpoints instance for the given supplier.
      Parameters:
      basePath - the base path of the endpoints
      supplier - the endpoint supplier
    • PathMappedEndpoints

      public PathMappedEndpoints(String basePath, Collection<EndpointsSupplier<?>> suppliers)
      Create a new PathMappedEndpoints instance for the given suppliers.
      Parameters:
      basePath - the base path of the endpoints
      suppliers - the endpoint suppliers
  • Method Details

    • getBasePath

      public String getBasePath()
      Return the base path for the endpoints.
      Returns:
      the base path
    • getRootPath

      public String getRootPath(EndpointId endpointId)
      Return the root path for the endpoint with the given ID or null if the endpoint cannot be found.
      Parameters:
      endpointId - the endpoint ID
      Returns:
      the root path or null
    • getPath

      public String getPath(EndpointId endpointId)
      Return the full path for the endpoint with the given ID or null if the endpoint cannot be found.
      Parameters:
      endpointId - the endpoint ID
      Returns:
      the full path or null
    • getAllRootPaths

      public Collection<String> getAllRootPaths()
      Return the root paths for each mapped endpoint (excluding additional paths).
      Returns:
      all root paths
    • getAllPaths

      public Collection<String> getAllPaths()
      Return the full paths for each mapped endpoint (excluding additional paths).
      Returns:
      all root paths
    • getAdditionalPaths

      public Collection<String> getAdditionalPaths(WebServerNamespace webServerNamespace, EndpointId endpointId)
      Return the additional paths for each mapped endpoint.
      Parameters:
      webServerNamespace - the web server namespace
      endpointId - the endpoint ID
      Returns:
      all additional paths
      Since:
      3.4.0
    • getEndpoint

      public PathMappedEndpoint getEndpoint(EndpointId endpointId)
      Return the PathMappedEndpoint with the given ID or null if the endpoint cannot be found.
      Parameters:
      endpointId - the endpoint ID
      Returns:
      the path mapped endpoint or null
    • stream

      public Stream<PathMappedEndpoint> stream()
      Returns:
      a stream of endpoints
    • iterator

      public Iterator<PathMappedEndpoint> iterator()
      Specified by:
      iterator in interface Iterable<PathMappedEndpoint>