public class PathMappedEndpoints extends Object implements Iterable<PathMappedEndpoint>
path mapped endpoints
.Constructor and Description |
---|
PathMappedEndpoints(String basePath,
Collection<EndpointsSupplier<?>> suppliers)
Create a new
PathMappedEndpoints instance for the given suppliers. |
PathMappedEndpoints(String basePath,
EndpointsSupplier<?> supplier)
Create a new
PathMappedEndpoints instance for the given supplier. |
Modifier and Type | Method and 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 the
PathMappedEndpoint with the given ID or null if the
endpoint cannot be found. |
String |
getPath(EndpointId endpointId)
Return the full path for the endpoint with the given ID or
null if the
endpoint cannot be found. |
String |
getRootPath(EndpointId endpointId)
Return the root path for the endpoint with the given ID or
null if the
endpoint cannot be found. |
Iterator<PathMappedEndpoint> |
iterator() |
Stream<PathMappedEndpoint> |
stream()
Stream all
path mapped endpoints . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public PathMappedEndpoints(String basePath, EndpointsSupplier<?> supplier)
PathMappedEndpoints
instance for the given supplier.basePath
- the base path of the endpointssupplier
- the endpoint supplierpublic PathMappedEndpoints(String basePath, Collection<EndpointsSupplier<?>> suppliers)
PathMappedEndpoints
instance for the given suppliers.basePath
- the base path of the endpointssuppliers
- the endpoint supplierspublic String getBasePath()
public String getRootPath(EndpointId endpointId)
null
if the
endpoint cannot be found.endpointId
- the endpoint IDnull
public String getPath(EndpointId endpointId)
null
if the
endpoint cannot be found.endpointId
- the endpoint IDnull
public Collection<String> getAllRootPaths()
public Collection<String> getAllPaths()
public PathMappedEndpoint getEndpoint(EndpointId endpointId)
PathMappedEndpoint
with the given ID or null
if the
endpoint cannot be found.endpointId
- the endpoint IDnull
public Stream<PathMappedEndpoint> stream()
path mapped endpoints
.public Iterator<PathMappedEndpoint> iterator()
iterator
in interface Iterable<PathMappedEndpoint>
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.