Class LinkDiscoverers
java.lang.Object
org.springframework.hateoas.client.LinkDiscoverers
Value object to wrap a
PluginRegistry
for LinkDiscoverer
so that it's easier to inject them into
clients wanting to lookup a LinkDiscoverer
for a given MediaTypes
.- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionLinkDiscoverers
(org.springframework.plugin.core.PluginRegistry<LinkDiscoverer, MediaType> discoverers) Creates a newLinkDiscoverers
instance with the givenPluginRegistry
. -
Method Summary
Modifier and TypeMethodDescriptiongetLinkDiscovererFor
(String mediaType) Returns theLinkDiscoverer
suitable for the given media type.getLinkDiscovererFor
(MediaType mediaType) Returns theLinkDiscoverer
suitable for the givenMediaType
.getRequiredLinkDiscovererFor
(String mediaType) Returns theLinkDiscoverer
suitable for the given media type.getRequiredLinkDiscovererFor
(MediaType mediaType) Returns theLinkDiscoverer
suitable for the givenMediaType
.
-
Constructor Details
-
LinkDiscoverers
public LinkDiscoverers(org.springframework.plugin.core.PluginRegistry<LinkDiscoverer, MediaType> discoverers) Creates a newLinkDiscoverers
instance with the givenPluginRegistry
.- Parameters:
discoverers
- must not be null.
-
-
Method Details
-
getLinkDiscovererFor
Returns theLinkDiscoverer
suitable for the givenMediaType
.- Parameters:
mediaType
-- Returns:
- will never be null.
-
getLinkDiscovererFor
Returns theLinkDiscoverer
suitable for the given media type.- Parameters:
mediaType
-- Returns:
-
getRequiredLinkDiscovererFor
Returns theLinkDiscoverer
suitable for the givenMediaType
.- Parameters:
mediaType
-- Returns:
- will never be null.
-
getRequiredLinkDiscovererFor
Returns theLinkDiscoverer
suitable for the given media type.- Parameters:
mediaType
-- Returns:
-