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 ofpath mapped endpoints
.
Constructor Summary
Constructors Constructor Description PathMappedEndpoints(String basePath, Collection<EndpointsSupplier<?>> suppliers)
Create a newPathMappedEndpoints
instance for the given suppliers.PathMappedEndpoints(String basePath, EndpointsSupplier<?> supplier)
Create a newPathMappedEndpoints
instance for the given supplier.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>
getAllPaths()
Return the full paths for each mapped endpoint.Collection<String>
getAllRootPaths()
Return the root paths for each mapped endpoint.String
getBasePath()
Return the base path for the endpoints.PathMappedEndpoint
getEndpoint(EndpointId endpointId)
Return thePathMappedEndpoint
with the given ID ornull
if the endpoint cannot be found.String
getPath(EndpointId endpointId)
Return the full path for the endpoint with the given ID ornull
if the endpoint cannot be found.String
getRootPath(EndpointId endpointId)
Return the root path for the endpoint with the given ID ornull
if the endpoint cannot be found.Iterator<PathMappedEndpoint>
iterator()
Stream<PathMappedEndpoint>
stream()
Stream allpath mapped endpoints
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Constructor Detail
PathMappedEndpoints
public PathMappedEndpoints(String basePath, EndpointsSupplier<?> supplier)
Create a newPathMappedEndpoints
instance for the given supplier.- Parameters:
basePath
- the base path of the endpointssupplier
- the endpoint supplier
PathMappedEndpoints
public PathMappedEndpoints(String basePath, Collection<EndpointsSupplier<?>> suppliers)
Create a newPathMappedEndpoints
instance for the given suppliers.- Parameters:
basePath
- the base path of the endpointssuppliers
- the endpoint suppliers
Method Detail
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 ornull
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 ornull
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.- Returns:
- all root paths
getAllPaths
public Collection<String> getAllPaths()
Return the full paths for each mapped endpoint.- Returns:
- all root paths
getEndpoint
public PathMappedEndpoint getEndpoint(EndpointId endpointId)
Return thePathMappedEndpoint
with the given ID ornull
if the endpoint cannot be found.- Parameters:
endpointId
- the endpoint ID- Returns:
- the path mapped endpoint or
null
stream
public Stream<PathMappedEndpoint> stream()
Stream allpath mapped endpoints
.- Returns:
- a stream of endpoints
iterator
public Iterator<PathMappedEndpoint> iterator()
- Specified by:
iterator
in interfaceIterable<PathMappedEndpoint>