LocalHostResourceManager

public class LocalHostResourceManager
extends Object implements IHostResourceManager

java.lang.Object
   ↳ com.android.tradefed.host.LocalHostResourceManager


管理員主機資源。主機資源是本機檔案。

摘要

公用建構函式

LocalHostResourceManager()

公用方法

void cleanup()

清理主機資源。

File getFile(String name)

根據資源 ID 取得主機資源本機檔案。

void setup()

設定主機資源。

受保護的方法

void clearHostResource(String name, File localFile)

清除本機主機資源。

File fetchHostResource(String name, String value)

使用本機檔案做為主機資源。

公用建構函式

LocalHostResourceManager

public LocalHostResourceManager ()

公用方法

清理

public void cleanup ()

清理主機資源。

getFile

public File getFile (String name)

根據資源 ID 取得主機資源本機檔案。

參數
name String:主機資源的資源 ID。

傳回
File 主機資源的本機檔案。

設定

public void setup ()

設定主機資源。主機資源可能來自不同位置,例如雲端上的遠端或本機檔案。這個介面可讓 tradefed 以統一方式取得所需的主機資源。setup 應正確將檔案下載至本機,之後 tradefed 就能透過 getFile 取得本機的主機資源名稱。

擲回
ConfigurationException

受保護的方法

clearHostResource

protected void clearHostResource (String name, 
                File localFile)

清除本機主機資源。

參數
name String:主機資源的 ID。

localFile File:本機檔案。

fetchHostResource

protected File fetchHostResource (String name, 
                String value)

使用本機檔案做為主機資源。

參數
name String:主機資源的名稱。

value String:主機資源的本機路徑。

傳回
File 本機檔案。

擲回
ConfigurationException