Methods of the NorthApiClient Class
The methods of the NorthApiClient class are used to create an application instance. They are the prerequisites for calling other SDK APIs. The following describes the main methods:
Method |
Description |
---|---|
public void setClientInfo(ClientInfo clientInfo) |
Initializes the parameters of NorthApiClient. For details on the definition of ClientInfo, see Methods of the Clientinfo Class. |
public void setHttpConnection(int httpSocketTimeout, int httpConnectionTimeout, int maxConnectionAmount, int maxConnectionAmountPerRoute) |
You can set the socket timeout interval (in milliseconds), connection timeout interval (in milliseconds), maximum number of connections, and maximum number of connections for each route in the HTTP connection pool. The default values of the four parameters are 30000, 30000, 200, and 200 respectively. This method must be called before the initSSLConfig() or initSSLConfig(SSLConfig sslConfig) method is called. |
public void initSSLConfig() |
Initializes the two-way authentication configuration. Other methods can only be used after this method is called.
NOTICE:
This method uses a test certificate, which is an informal certificate, and does not verify the host name. Therefore, this method is used only in the integration interconnection commissioning phase. |
public void initSSLConfig(SSLConfig sslConfig) |
Initializes the two-way authentication configuration. Other methods can only be used after this method is called. For details on the definition of SSLConfig, see SSLConfig Class Method Description.
NOTICE:
This method is used to import certificates and can be used in commercial use. Before calling this method, you can call the setHostnameVerifier(HostnameVerifier hostnameVerifier) method to verify the host name. Otherwise, the strict host name verification is used by default. |
public void setHostnameVerifier(HostnameVerifier hostnameVerifier) |
Customizes the host name verification method. This method needs to be called before the initSSLConfig(SSLConfig sslConfig) method is called. Otherwise, the strict host name verification is used by default.
NOTICE:
|
public String getVersion() |
Queries the SDK version. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot