Interface PathMapper
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy interface used to provide a mapping between an endpoint ID and the root path
where it will be exposed.
- Since:
- 2.0.0
- Author:
- Stephane Nicoll, Phillip Webb
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetRootPath(List<PathMapper> pathMappers, EndpointId endpointId) Resolve the root path for the specifiedendpointIdfrom the given path mappers.getRootPath(EndpointId endpointId) Resolve the root path for the specifiedendpointId.
-
Method Details
-
getRootPath
Resolve the root path for the specifiedendpointId.- Parameters:
endpointId- the id of an endpoint- Returns:
- the path of the endpoint or
nullif this mapper doesn't support the given endpoint ID
-
getRootPath
Resolve the root path for the specifiedendpointIdfrom the given path mappers. If no mapper matches then the ID itself is returned.- Parameters:
pathMappers- the path mappers (may benull)endpointId- the id of an endpoint- Returns:
- the path of the endpoint
-