自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
JSONFileKeyStoreFactory
public
class
JSONFileKeyStoreFactory
extends Object
implements
IKeyStoreFactory
java.lang.Object
|
↳ |
com.android.tradefed.util.keystore.JSONFileKeyStoreFactory
|
实现了 JSON KeyStore 工厂,该工厂提供了用于访问 JSON Key Store 文件的 JSONFileKeyStoreClient
。
摘要
公共构造函数
JSONFileKeyStoreFactory
public JSONFileKeyStoreFactory ()
公共方法
createKeyStoreClient
public IKeyStoreClient createKeyStoreClient ()
创建一个密钥库客户端,用于从密钥库中提取值。
setHostName
public void setHostName (String hostName)
用于设置主机名的辅助方法。用于测试。
参数 |
hostName |
String :用作主机名。 |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# JSONFileKeyStoreFactory\n=======================\n\n\n`\npublic\n\n\nclass\nJSONFileKeyStoreFactory\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\n`[IKeyStoreFactory](../../../../../../../reference/tradefed/com/android/tradefed/util/keystore/IKeyStoreFactory.html)`\n\n\n`\n\n|---|------------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.util.keystore.JSONFileKeyStoreFactory |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nImplementation of a JSON KeyStore Factory, which provides a [JSONFileKeyStoreClient](../../../../../../../reference/tradefed/com/android/tradefed/util/keystore/JSONFileKeyStoreClient.html) for\naccessing a JSON Key Store File.\n\nSummary\n-------\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[JSONFileKeyStoreFactory](../../../../../../../reference/tradefed/com/android/tradefed/util/keystore/JSONFileKeyStoreFactory.html#JSONFileKeyStoreFactory())`() ` |\n\n| ### Public methods ||\n|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[IKeyStoreClient](../../../../../../../reference/tradefed/com/android/tradefed/util/keystore/IKeyStoreClient.html) | ` `[createKeyStoreClient](../../../../../../../reference/tradefed/com/android/tradefed/util/keystore/JSONFileKeyStoreFactory.html#createKeyStoreClient())`() ` Creates a key store client for fetching values from key store. |\n| ` void` | ` `[setHostName](../../../../../../../reference/tradefed/com/android/tradefed/util/keystore/JSONFileKeyStoreFactory.html#setHostName(java.lang.String))`(String hostName) ` Helper method used to set host name. |\n\nPublic constructors\n-------------------\n\n### JSONFileKeyStoreFactory\n\n```\npublic JSONFileKeyStoreFactory ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### createKeyStoreClient\n\n```\npublic IKeyStoreClient createKeyStoreClient ()\n```\n\nCreates a key store client for fetching values from key store.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| [IKeyStoreClient](../../../../../../../reference/tradefed/com/android/tradefed/util/keystore/IKeyStoreClient.html) | [IKeyStoreClient](../../../../../../../reference/tradefed/com/android/tradefed/util/keystore/IKeyStoreClient.html) \u003cbr /\u003e |\n\n| Throws ||\n|------------------------------------------------------------------------------------------------------------------------|---|\n| [KeyStoreException](../../../../../../../reference/tradefed/com/android/tradefed/util/keystore/KeyStoreException.html) | |\n\n### setHostName\n\n```\npublic void setHostName (String hostName)\n```\n\nHelper method used to set host name. Used for testing.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|---------------------------------------|\n| `hostName` | `String`: to use as host name. \u003cbr /\u003e |"]]