public class PathMappedEndpoints extends java.lang.Object implements java.lang.Iterable<PathMappedEndpoint>
path mapped endpoints.| Constructor and Description |
|---|
PathMappedEndpoints(java.lang.String basePath,
java.util.Collection<EndpointsSupplier<?>> suppliers)
Create a new
PathMappedEndpoints instance for the given suppliers. |
PathMappedEndpoints(java.lang.String basePath,
EndpointsSupplier<?> supplier)
Create a new
PathMappedEndpoints instance for the given supplier. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<java.lang.String> |
getAllPaths()
Return the full paths for each mapped endpoint.
|
java.util.Collection<java.lang.String> |
getAllRootPaths()
Return the root paths for each mapped endpoint.
|
java.lang.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. |
java.lang.String |
getPath(EndpointId endpointId)
Return the full path for the endpoint with the given ID or
null if the
endpoint cannot be found. |
java.lang.String |
getRootPath(EndpointId endpointId)
Return the root path for the endpoint with the given ID or
null if the
endpoint cannot be found. |
java.util.Iterator<PathMappedEndpoint> |
iterator() |
java.util.stream.Stream<PathMappedEndpoint> |
stream()
Stream all
path mapped endpoints. |
public PathMappedEndpoints(java.lang.String basePath,
EndpointsSupplier<?> supplier)
PathMappedEndpoints instance for the given supplier.basePath - the base path of the endpointssupplier - the endpoint supplierpublic PathMappedEndpoints(java.lang.String basePath,
java.util.Collection<EndpointsSupplier<?>> suppliers)
PathMappedEndpoints instance for the given suppliers.basePath - the base path of the endpointssuppliers - the endpoint supplierspublic java.lang.String getBasePath()
public java.lang.String getRootPath(EndpointId endpointId)
null if the
endpoint cannot be found.endpointId - the endpoint IDnullpublic java.lang.String getPath(EndpointId endpointId)
null if the
endpoint cannot be found.endpointId - the endpoint IDnullpublic java.util.Collection<java.lang.String> getAllRootPaths()
public java.util.Collection<java.lang.String> getAllPaths()
public PathMappedEndpoint getEndpoint(EndpointId endpointId)
PathMappedEndpoint with the given ID or null if the
endpoint cannot be found.endpointId - the endpoint IDnullpublic java.util.stream.Stream<PathMappedEndpoint> stream()
path mapped endpoints.public java.util.Iterator<PathMappedEndpoint> iterator()
iterator in interface java.lang.Iterable<PathMappedEndpoint>