Class ZulipConfiguration

java.lang.Object
com.github.jamesnetherton.zulip.client.http.ZulipConfiguration

public class ZulipConfiguration extends Object
Provides configuration options for the Zulip HTTP client library.
  • Constructor Details

    • ZulipConfiguration

      public ZulipConfiguration(URL zulipUrl, String email, String apiKey)
      Constructs a ZulipConfiguration
      Parameters:
      zulipUrl - The URL of the Zulip server
      email - The user email address to use for authentication
      apiKey - The user API key to use for authentication
  • Method Details

    • getApiKey

      public String getApiKey()
    • setApiKey

      public void setApiKey(String apiKey)
      Sets the API key to use for authenticating with the Zulip server
      Parameters:
      apiKey - The user API key
    • setEmail

      public void setEmail(String email)
      Sets the email address to use for authenticating with the Zulip server
      Parameters:
      email - The user email address
    • getEmail

      public String getEmail()
    • setInsecure

      public void setInsecure(boolean insecure)
      Whether to trust all SSL certificates. NOT recommended for production usage.
      Parameters:
      insecure - true if unknown certificates should be trusted. false to not trust unknown certificates and to receive an exception
    • isInsecure

      public boolean isInsecure()
    • setProxyUrl

      public void setProxyUrl(URL proxyUrl)
      The full URL to the proxy server that is to be used for Zulip API requests.
      Parameters:
      proxyUrl - The URL representing the proxy server URL
    • getProxyUrl

      public URL getProxyUrl()
    • setProxyUsername

      public void setProxyUsername(String proxyUsername)
      The proxy server username to authenticate with the proxy server when making Zulip API requests.
      Parameters:
      proxyUsername - The proxy server username
    • getProxyUsername

      public String getProxyUsername()
    • setProxyPassword

      public void setProxyPassword(String proxyPassword)
      The proxy server password to authenticate with the proxy server when making Zulip API requests.
      Parameters:
      proxyPassword - The proxy server password
    • getProxyPassword

      public String getProxyPassword()
    • setZulipHttpClientFactory

      public void setZulipHttpClientFactory(ZulipHttpClientFactory zulipHttpClientFactory)
      The ZulipHttpClientFactory to use for configuring the ZulipHttpClient.
      Parameters:
      zulipHttpClientFactory - The client factory implementation to use
    • getZulipHttpClientFactory

      public ZulipHttpClientFactory getZulipHttpClientFactory()
    • setZulipUrl

      public void setZulipUrl(URL zulipUrl)
      The URL for the Zulip server. Note this should be the base url without the /api/v1 suffix.
      Parameters:
      zulipUrl - The Zulip server URL
    • getZulipUrl

      public URL getZulipUrl()
    • fromZuliprc

      public static ZulipConfiguration fromZuliprc()
      Creates a ZulipConfiguration instance from a zuliprc properties file that is stored within the user home directory.
      Returns:
      The ZulipConfiguration created from the properties within the zuliprc file
    • fromZuliprc

      public static ZulipConfiguration fromZuliprc(File zulipRcFile)
      Creates a ZulipConfiguration instance from the specified zuliprc properties file.
      Returns:
      The ZulipConfiguration created from the properties within the zuliprc file