Show Table of Contents
附录 B. ConnectionBuilder 的方法
下表列出了 Java 软件开发套件 V4 版本中
ConnectionBuilder 类可以使用的关键方法(method)。
表 B.1. ConnectionBuilder 的方法
| 方法 | 参数类型 | 描述 |
|---|---|---|
user | String | 连接到 Manager 的用户的名称。您需要知道用户名和域(如 admin@internal)。这个方法需要和 password 方法一起使用。 |
password | String | 连接到 Manager 的用户的密码。 |
compress | Boolean | 指定从运行 Manager 的服务器上返回的信息是否要压缩。这个选项在默认情况下被禁用,您只有在需要启用这个选项时才使用这个方法。 |
timeout | Integer | 等待请求响应的超时时间(以秒为单位)。如果请求在这个设置的时间内没有获得响应,则这个请求会被取消,并产生一个异常(exception)。这个参数是可选的。 |
ssoUrl | String | 运行 Manager 的服务器的基本 URL。例如, https://server.example.com/ovirt-engine/sso/oauth/token?\grant_type=password&scope=ovirt-app-api 代表密码验证。 |
ssoRevokeUrl | String | SSO revoke 服务的基本 URL。只有在使用外部验证服务时才使用这个选项。在默认情况下,这个 URL 的值会根据 url 选项的值自动计算,SSO token revoke 会使用作为引擎一部分的 SSO 服务进行。 |
ssoTokenName | String | SSO 服务器返回的 JSON SSO 响应数据中的 token 名。在默认情况下,这个值是 access_token。 |
insecure | Boolean | 指定是否验证运行 Manager 的服务器上的 SSL 证书中的主机名。在默认情况下,主机名会被验证,如果主机名不正确,连接会被拒绝。只有在需要禁用这个选项时才使用这个方法。 |
trustStoreFile | String | 指定包括一个 CA 证书的文件位置。这个证书被用来验证运行 Manager 的服务器上的证书。这个方法需要和 trustStorePassword 方法一起使用。 |
trustStorePassword | String | 访问在 trustStorePath 方法中指定的 keystore 文件时使用的密码。 |

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.