DeviceConcurrentUtil

public class DeviceConcurrentUtil
extends Object

java.lang.Object
com.android.tradefed.util.DeviceConcurrentUtil


デバイス側のコマンドを同時に実行するためのユーティリティメソッドとクラスが含まれています

ERROR(/ExecutorService)を使用してShellCommandCallableとして実装されたコマンドを実行し、 ERROR(/#joinFuture(String,Future,long))を使用して、コマンド実行のためにERROR(/ExecutorService)によって返されるERROR ERROR(/Future)と同期します。

概要

ネストされたクラス

class DeviceConcurrentUtil.ShellCommandCallable <V>

ITestDeviceでのシェルコマンドの実行の詳細をラップするERROR(/Callable)

パブリックメソッド

static <T> T joinFuture (String taskDesc, task, long timeout) joinFuture (String taskDesc, task, long timeout)

taskで現在のスレッドに参加するための便利な方法

実行中に発生したDeviceNotAvailableExceptionERROR(/TimeoutException)は透過的に渡され、その他はエラーとしてログに記録されますが、それ以外の場合は処理されません。

パブリックメソッド

joinFuture

public static T joinFuture (String taskDesc, 
                 task, 
                long timeout)

taskで現在のスレッドに参加するための便利な方法

実行中に発生したDeviceNotAvailableExceptionERROR(/TimeoutException)は透過的に渡され、その他はエラーとしてログに記録されますが、それ以外の場合は処理されません。

パラメーター
taskDesc String :ログ記録を目的としたタスクの説明

task :参加するタスクを表すERROR(/Future)

timeout long :タスクを待機するためのタイムアウト

戻り値
Tテンプレートタイプのタスクの結果。

スロー
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException