Class CachingMappingDiscoverer
java.lang.Object
org.springframework.hateoas.server.core.CachingMappingDiscoverer
- All Implemented Interfaces:
MappingDiscoverer
Caching adapter of
MappingDiscoverer.- Author:
- Michal Stochmialek, Oliver Drotbohm, Réda Housni Alaoui
-
Method Summary
Modifier and TypeMethodDescriptiongetConsumes(Method method) Returns theMediaTypes supported for consumption.getMapping(Class<?> type) Returns the mapping associated with the given type.getMapping(Class<?> type, Method method) Returns the mapping for the givenMethodinvoked on the given type.getMapping(Method method) Returns the mapping associated with the givenMethod.String[]Returns the statically declared request parameters.getRequestMethod(Class<?> type, Method method) Returns the HTTP verbs for the givenMethodinvoked on the given type.static CachingMappingDiscovererof(MappingDiscoverer delegate) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.hateoas.server.core.MappingDiscoverer
getUriMapping, getUriMapping, getUriMapping
-
Method Details
-
of
-
getMapping
Description copied from interface:MappingDiscovererReturns the mapping associated with the given type.- Specified by:
getMappingin interfaceMappingDiscoverer- Parameters:
type- must not be null.- Returns:
- the type-level mapping or null in case none is present.
-
getMapping
Description copied from interface:MappingDiscovererReturns the mapping associated with the givenMethod. This will include the type-level mapping.- Specified by:
getMappingin interfaceMappingDiscoverer- Parameters:
method- must not be null.- Returns:
- the method mapping including the type-level one or null if neither of them present.
-
getMapping
Description copied from interface:MappingDiscovererReturns the mapping for the givenMethodinvoked on the given type. This can be used to calculate the mapping for a super type method being invoked on a sub-type with a type mapping.- Specified by:
getMappingin interfaceMappingDiscoverer- Parameters:
type- must not be null.method- must not be null.- Returns:
- the method mapping including the type-level one or null if neither of them present.
-
getRequestMethod
Description copied from interface:MappingDiscovererReturns the HTTP verbs for the givenMethodinvoked on the given type. This can be used to build hypermedia templates.- Specified by:
getRequestMethodin interfaceMappingDiscoverer- Returns:
-
getConsumes
Description copied from interface:MappingDiscovererReturns theMediaTypes supported for consumption.- Specified by:
getConsumesin interfaceMappingDiscoverer- Parameters:
method- must not be null.- Returns:
- can be null.
-
getParams
Description copied from interface:MappingDiscovererReturns the statically declared request parameters.- Specified by:
getParamsin interfaceMappingDiscoverer- Parameters:
method- must not be null.- Returns:
- the parameters of the mapped request, narrowing the primary mapping.
-