Class AbstractAPIHandler.Conf<T extends AbstractAPIHandler.Conf<T>>

    • Constructor Detail

      • Conf

        public Conf()
    • Method Detail

      • setApiUrl

        public T setApiUrl​(java.lang.String apiUrl)
                    throws java.net.MalformedURLException
        Parameters:
        apiUrl - The root url for the API
        Returns:
        self()
        Throws:
        java.net.MalformedURLException - When the apiUrl is a malformed URL.
      • setApiUrl

        public T setApiUrl​(java.net.URL apiUrl)
        Parameters:
        apiUrl - The root url for the API
        Returns:
        self()
      • setWebSocketUri

        public T setWebSocketUri​(java.lang.String webSocketUri)
                          throws java.net.URISyntaxException
        Parameters:
        webSocketUri - The root uri for the WebSockets. If this is missing, the uri will be constructed from an apiUrl.
        Returns:
        self()
        Throws:
        java.net.URISyntaxException - When the webSocketUri is a malformed URI.
      • setWebSocketUrl

        public T setWebSocketUrl​(java.net.URL apiUrl)
        Parameters:
        apiUrl - The root url for the WebSockets
        Returns:
        self()
      • setUserAgent

        public T setUserAgent​(java.lang.String userAgent)
        For header "User-Agent". Default is determined by the package.
        Parameters:
        userAgent - The line for the User-Agent header.
        Returns:
        self()
      • setHttpRequestTimeout

        public T setHttpRequestTimeout​(java.lang.Long httpRequestTimeout)
        Parameters:
        httpRequestTimeout - Request timeout in ms.
        Returns:
        self()
      • setMaxRetries

        public T setMaxRetries​(int maxRetries)
        Parameters:
        maxRetries - Max amount of retries when http errors are received. The default is 0.
        Returns:
        self()
      • self

        protected abstract T self()