Class Zulip.Builder
java.lang.Object
com.github.jamesnetherton.zulip.client.Zulip.Builder
- Enclosing class:
Zulip
Builder class for constructing the Zulip Client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the Zulip API key to use for authentication with the Zulip server.build()Builds a newZulipinstance.Sets the Zulip email address to use for authentication with the Zulip server.httpClientFactory(ZulipHttpClientFactory httpClientFactory) Sets a customZulipHttpClientFactoryto enable the Zulip client to use an HTTP client other than the default Apache Commons HTTP client.insecure(boolean insecure) Sets whether the Zulip HTTP client should ignore SSL certificate validation errors.proxyPassword(String proxyPassword) Sets the proxy server password that the Zulip HTTP client should use when making requests to the Zulip server.Sets the proxy server URL that the Zulip HTTP client should use when making requests to the Zulip server.proxyUsername(String proxyUsername) Sets the proxy server user name that the Zulip HTTP client should use when making requests to the Zulip server.Sets the URL of the Zulip server.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKey
Sets the Zulip API key to use for authentication with the Zulip server.- Parameters:
apiKey- The user API key- Returns:
- This
Zulip.Builderobject - See Also:
-
email
Sets the Zulip email address to use for authentication with the Zulip server.- Parameters:
email- The user email address- Returns:
- This
Zulip.Builderobject
-
httpClientFactory
Sets a customZulipHttpClientFactoryto enable the Zulip client to use an HTTP client other than the default Apache Commons HTTP client.- Parameters:
httpClientFactory- TheZulipHttpClientFactoryimplementation- Returns:
- This
Zulip.Builderobject
-
insecure
Sets whether the Zulip HTTP client should ignore SSL certificate validation errors. This is not recommended for production use.- Parameters:
insecure-trueif unknown certificates should be trusted.falseto not trust unknown certificates and to receive an exception- Returns:
- This
Zulip.Builderobject
-
proxyUrl
Sets the proxy server URL that the Zulip HTTP client should use when making requests to the Zulip server.- Parameters:
proxyUrl- The proxy server URL- Returns:
- This
Zulip.Builderobject
-
proxyUsername
Sets the proxy server user name that the Zulip HTTP client should use when making requests to the Zulip server.- Parameters:
proxyUsername- The proxy server username- Returns:
- This
Zulip.Builderobject
-
proxyPassword
Sets the proxy server password that the Zulip HTTP client should use when making requests to the Zulip server.- Parameters:
proxyPassword- The proxy server password- Returns:
- This
Zulip.Builderobject
-
site
Sets the URL of the Zulip server.- Parameters:
site- The URL of the Zulip server. Note this should be without the /api/v1 suffix.- Returns:
- This
Zulip.Builderobject
-
build
Builds a newZulipinstance.- Returns:
- A new
Zulipclient object - Throws:
ZulipClientException
-