Class AbstractVersionAPIHandler

    • Constructor Detail

      • AbstractVersionAPIHandler

        protected AbstractVersionAPIHandler​(AbstractVersionAPIHandler.Conf<?> builder)
        Constructor
        Parameters:
        builder - The builder to use.
    • Method Detail

      • requestVersionMap

        protected VersionResponse requestVersionMap()
                                             throws java.io.IOException,
                                                    java.lang.InterruptedException,
                                                    HiroException
        Get API Versions

        HIRO REST query API: `GET AbstractAPIHandler.rootApiURI + '/api/version'`

        Returns:
        A map with the api versions
        Throws:
        HiroException - When the request fails.
        java.io.IOException - When the connection fails.
        java.lang.InterruptedException - When interrupted.
      • getVersionMap

        public VersionResponse getVersionMap()
                                      throws HiroException,
                                             java.io.IOException,
                                             java.lang.InterruptedException
        Returns the current versionMap. If no versionMap is available, it will be requested, cached and then returned. if a sharedConnectionHandler is set, the versionMap will be obtained from there.
        Returns:
        The (cached) versionMap.
        Throws:
        HiroException - When the request fails.
        java.io.IOException - When the connection fails.
        java.lang.InterruptedException - When interrupted.
      • getApiURIOf

        public java.net.URI getApiURIOf​(java.lang.String apiName)
                                 throws java.io.IOException,
                                        java.lang.InterruptedException,
                                        HiroException
        Determine the API URI path for a named API.
        Parameters:
        apiName - Name of the API
        Returns:
        The URI for that API
        Throws:
        HiroException - When the request fails.
        java.io.IOException - When the connection fails.
        java.lang.InterruptedException - When interrupted.