Package de.sfuhrm.radiobrowser4j
Class EndpointDiscovery
- java.lang.Object
-
- de.sfuhrm.radiobrowser4j.EndpointDiscovery
-
public class EndpointDiscovery extends Object
Discovers the radio browser API endpoint that suits the application.
-
-
Constructor Summary
Constructors Constructor Description EndpointDiscovery(@NonNull String myUserAgent)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>discover()Discovers the best performing endpoint.
-
-
-
Constructor Detail
-
EndpointDiscovery
public EndpointDiscovery(@NonNull @NonNull String myUserAgent)Constructs a new instance.- Parameters:
myUserAgent- the user agent String to use while discovery.
-
-
Method Detail
-
discover
public Optional<String> discover() throws IOException
Discovers the best performing endpoint.- Returns:
- an optional endpoint address that can be passed to
the
RadioBrowserconstructors. - Throws:
IOException- when there is an IO problem while discovery.
-
-