遠端檔案解析器

public interface IRemoteFileResolver

com.android.tradefed.config.remote.IRemoteFileResolver


可以將遠端檔案解析為本機檔案的物件的介面。例如:gs://bucket/dir/file.txt 將會下載並變更為本機路徑。

概括

嵌套類

class IRemoteFileResolver.RemoteFileResolverArgs

傳遞給解析器的參數

class IRemoteFileResolver.ResolvedFile

保存有關已解析文件和一些元資料的資訊的類別。

公共方法

abstract String getSupportedProtocol ()

傳回支援下載的關聯協定。

default IRemoteFileResolver.ResolvedFile resolveRemoteFile ( IRemoteFileResolver.RemoteFileResolverArgs args)

在面向未來的介面中解析遠端文件

default File resolveRemoteFiles (File consideredFile)

解析遠端檔案。

default File resolveRemoteFiles (File consideredFile, queryArgs) resolveRemoteFiles (File consideredFile, queryArgs)

解析遠端檔案。

default void setPrimaryDevice ( ITestDevice device)

實作接收被測設備的 {@ink ITestDevice} 表示的可選方式。

公共方法

獲取支援的協議

public abstract String getSupportedProtocol ()

傳回支援下載的關聯協定。

退貨
String

解析遠端文件

public IRemoteFileResolver.ResolvedFile resolveRemoteFile (IRemoteFileResolver.RemoteFileResolverArgs args)

在面向未來的介面中解析遠端文件

參數
args IRemoteFileResolver.RemoteFileResolverArgsRemoteFileResolverArgs描述遠端下載以及如何下載。

退貨
IRemoteFileResolver.ResolvedFile已解析的本機檔案表示形式。

投擲
BuildRetrievalError如果出了問題。

解析遠端文件

public File resolveRemoteFiles (File consideredFile)

解析遠端檔案。

參數
consideredFile FileERROR(/File)評估為遠端。

退貨
File已解析的本機檔案。

投擲
BuildRetrievalError如果出了問題。

解析遠端文件

public File resolveRemoteFiles (File consideredFile, 
                 queryArgs)

解析遠端檔案。

參數
consideredFile FileERROR(/File)評估為遠端。

queryArgs :作為 URL 查詢傳遞的參數。

退貨
File已解析的本機檔案。

投擲
BuildRetrievalError如果出了問題。

設定主設備

public void setPrimaryDevice (ITestDevice device)

實作接收被測設備的 {@ink ITestDevice} 表示的可選方式。

參數
device ITestDevice :目前呼叫的ITestDevice