Class RadioReferenceService

java.lang.Object
io.github.dsheirer.rrapi.RadioReferenceService

public class RadioReferenceService extends Object
Java client for accessing the radioreference.com web services API Uses the Java HttpClient with no dependencies on legacy Axis 1.4 libraries. Thread safe: methods can be called concurrently. Each request is limited by the connect and request timeouts, and async(ServiceCall) runs any call in the background with cancellation.
  • Field Details

    • API_VERSION

      public static final String API_VERSION
      Radio Reference API version supported by this service.
      See Also:
    • DEFAULT_CONNECT_TIMEOUT

      public static final Duration DEFAULT_CONNECT_TIMEOUT
      Default limit for establishing a connection to the web service
    • DEFAULT_REQUEST_TIMEOUT

      public static final Duration DEFAULT_REQUEST_TIMEOUT
      Default limit for receiving the response to a request, after the request is sent
  • Constructor Details

    • RadioReferenceService

      public RadioReferenceService(AuthorizationInformation authorizationInformation) throws RadioReferenceException
      Constructs an instance of the service
      Parameters:
      authorizationInformation - with username and password for accessing the web service
      Throws:
      RadioReferenceException - if there are any errors while accessing the service
    • RadioReferenceService

      public RadioReferenceService(AuthorizationInformation authorizationInformation, Duration connectTimeout, Duration requestTimeout) throws RadioReferenceException
      Constructs an instance of the service with custom timeouts
      Parameters:
      authorizationInformation - with username and password for accessing the web service
      connectTimeout - limit for establishing a connection to the web service
      requestTimeout - limit for receiving the response to each request
      Throws:
      RadioReferenceException - if the authorization information is null
      IllegalArgumentException - if a timeout is null, zero or negative
  • Method Details