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
ConstructorsConstructorDescriptionLinkDiscoverers(org.springframework.plugin.core.PluginRegistry<LinkDiscoverer, MediaType> discoverers) Creates a newLinkDiscoverersinstance with the givenPluginRegistry. -
Method Summary
Modifier and TypeMethodDescriptiongetLinkDiscovererFor(String mediaType) Returns theLinkDiscoverersuitable for the given media type.getLinkDiscovererFor(MediaType mediaType) Returns theLinkDiscoverersuitable for the givenMediaType.getRequiredLinkDiscovererFor(String mediaType) Returns theLinkDiscoverersuitable for the given media type.getRequiredLinkDiscovererFor(MediaType mediaType) Returns theLinkDiscoverersuitable for the givenMediaType.
-
Constructor Details
-
LinkDiscoverers
public LinkDiscoverers(org.springframework.plugin.core.PluginRegistry<LinkDiscoverer, MediaType> discoverers) Creates a newLinkDiscoverersinstance with the givenPluginRegistry.- Parameters:
discoverers- must not be null.
-
-
Method Details
-
getLinkDiscovererFor
Returns theLinkDiscoverersuitable for the givenMediaType.- Parameters:
mediaType-- Returns:
- will never be null.
-
getLinkDiscovererFor
Returns theLinkDiscoverersuitable for the given media type.- Parameters:
mediaType-- Returns:
-
getRequiredLinkDiscovererFor
Returns theLinkDiscoverersuitable for the givenMediaType.- Parameters:
mediaType-- Returns:
- will never be null.
-
getRequiredLinkDiscovererFor
Returns theLinkDiscoverersuitable for the given media type.- Parameters:
mediaType-- Returns:
-