ICommandScheduler

public interface ICommandScheduler

com.android.tradefed.command.ICommandScheduler


TradeFederation コマンドを実行するためのスケジューラ。

概要

ネストされたクラス

interface ICommandScheduler.IScheduledInvocationListener

呼び出し完了時の呼び出しイベントのリスナー。 

パブリック メソッド

abstract boolean addCommand(String[] args)

スケジューラにコマンドを追加します。

abstract void addCommandFile(String cmdFile, extraArgs)

指定されたファイルのすべてのコマンドをスケジューラに追加する

abstract void await()

古い TF からのハンドオーバーの完了を待つなど、スケジューラの実行開始を待機する 。

abstract void completeHandover()

開始されたハンドオーバー シーケンスが完全に完了したことをコマンド スケジューラに通知し、 デフォルト ポートでリモート マネージャーを再初期化する必要があります。

abstract void displayCommandQueue(PrintWriter printWriter)

コマンド実行キューの状態に関する詳細なデバッグ情報を出力します。

abstract void displayCommandsInfo(PrintWriter printWriter, String regex)

現在のコマンドのリストを出力します。

abstract void displayInvocationsInfo(PrintWriter printWriter)

現在の呼び出しのリストを表示します。

abstract void dumpCommandsXml(PrintWriter printWriter, String regex)

コマンドの拡張 xml ファイルをダンプする 現在のすべてのコマンドに指定された Option 値。

abstract void execCommand(IInvocationContext context, ICommandScheduler.IScheduledInvocationListener listener, String[] args)

デバイスを直接割り当て、コマンドキューに追加せずにコマンドを実行する 既存の IInvocationContext を使用します。

abstract void execCommand(ICommandScheduler.IScheduledInvocationListener listener, String[] args)

デバイスを直接割り当てて、コマンドキューに追加せずにコマンドを実行します。

abstract void execCommand(ICommandScheduler.IScheduledInvocationListener listener, ITestDevice device, String[] args)

すでに割り当てられているデバイスでコマンドを直接実行します。

abstract CommandFileWatcher getCommandFileWatcher()

このスケジューラに適した CommandFileWatcher を取得する

abstract int getExecutingCommandCount()

実行状態のコマンドの数を返します。

abstract String getInvocationInfo(int invocationId)

呼び出し ID を指定して呼び出し bu の情報を返します。

abstract CommandRunner.ExitCode getLastInvocationExitCode()

最後に実行された呼び出しのエラーコードを返します。

abstract Throwable getLastInvocationThrowable()

最後に実行された呼び出しから Throwable を返します。

abstract int getReadyCommandCount()

キュー内の準備完了状態のコマンドの数を返します。

abstract void handoverInitiationComplete()

使用中のデバイスとコマンドの初期ハンドオーバー交換をコマンド スケジューラに通知する オペレーションのスケジューリングを開始できます。

abstract boolean handoverShutdown(int handoverPort)

shutdown() を開始し、この同じホスト上の別の tradefed プロセスにハンドオーバーします。

abstract void join()

スケジューラが完了するまで待機します。

abstract void join(long millis)

ミリ秒単位で指定された期間が経過したら、スケジューラが完了するかタイムアウトするのを待ちます。

abstract void removeAllCommands()

スケジューラからすべてのコマンドを削除

abstract void setClearcutClient(ClearcutClient client)

ハーネスデータを報告するようにクライアントを設定する

abstract boolean shouldShutdownOnCmdfileError()

コマンドエラーでスケジューラをシャットダウンする必要がある場合は true を返す

abstract void shutdown()

コマンド スケジューラを正常にシャットダウンしてみます。

abstract void shutdownHard(boolean killAdb)

コマンド スケジューラの強制シャットダウンを試みます。

abstract void shutdownHard()

コマンド スケジューラの強制シャットダウンを試みます。

abstract void shutdownOnEmpty()

shutdown() に似ていますが、すべてのコマンドの実行を待機します。 終了です。

abstract void start()

ICommandScheduler を起動します。

abstract boolean stopInvocation(int invocationId, String cause)

ID を指定して実行中の呼び出しを停止します。

default boolean stopInvocation(int invocationId)

ID を指定して実行中の呼び出しを停止します。

abstract boolean stopInvocation(ITestInvocation invocation)

実行中の呼び出しを停止します。

パブリック メソッド

addCommand

public abstract boolean addCommand (String[] args)

スケジューラにコマンドを追加します。

コマンドは基本的に、実行する構成のインスタンスとそれに関連する引数です。

「--help」の場合引数には、指定されたロールと 構成は stdout に出力されます。それ以外の場合は、構成がキューに追加され、 あります。

パラメータ
args String: 構成引数。

戻り値
boolean コマンドが正常に追加された場合は true

例外
ConfigurationException コマンドを解析できなかった場合

addCommandFile

public abstract void addCommandFile (String cmdFile, 
                 extraArgs)

指定されたファイルのすべてのコマンドをスケジューラに追加する

パラメータ
cmdFile String: コマンド ファイルのファイル システム パス

extraArgs : 解析された各コマンドに追加する String 引数の ERROR(/List) おすすめします。空にすることもできますが、null にすることはできません。

例外
ConfigurationException コマンド ファイルを解析できなかった場合

関連項目:

待って

public abstract void await ()

古い TF からのハンドオーバーの完了を待つなど、スケジューラの実行開始を待機する 。

引き渡しの完了

public abstract void completeHandover ()

開始されたハンドオーバー シーケンスが完全に完了したことをコマンド スケジューラに通知し、 デフォルト ポートでリモート マネージャーを再初期化する必要があります。

displayCommandQueue

public abstract void displayCommandQueue (PrintWriter printWriter)

コマンド実行キューの状態に関する詳細なデバッグ情報を出力します。

displayCommandsInfo

public abstract void displayCommandsInfo (PrintWriter printWriter, 
                String regex)

現在のコマンドのリストを出力します。

パラメータ
printWriter PrintWriter: 出力先の ERROR(/PrintWriter)

regex String: コマンドを照合する正規表現 表示されます。null の場合、すべてのコマンドが出力されます。

displayInvocationsInfo

public abstract void displayInvocationsInfo (PrintWriter printWriter)

現在の呼び出しのリストを表示します。

パラメータ
printWriter PrintWriter: 出力先の ERROR(/PrintWriter)

dumpCommandsXml

public abstract void dumpCommandsXml (PrintWriter printWriter, 
                String regex)

コマンドの拡張 xml ファイルをダンプする 現在のすべてのコマンドに指定された Option 値。

パラメータ
printWriter PrintWriter: ステータスの出力先の ERROR(/PrintWriter)

regex String: ダンプする xml ファイルを指定します。null の場合、すべてのコマンドがダンプされます。

execCommand

public abstract void execCommand (IInvocationContext context, 
                ICommandScheduler.IScheduledInvocationListener listener, 
                String[] args)

デバイスを直接割り当て、コマンドキューに追加せずにコマンドを実行する 既存の IInvocationContext を使用します。

パラメータ
context IInvocationContext: 既存の IInvocationContext

listener ICommandScheduler.IScheduledInvocationListener: 通知対象の ICommandScheduler.IScheduledInvocationListener

args String: コマンド引数

例外
ConfigurationException if コマンドが無効な場合
NoDeviceException 使用するデバイスがない場合に

execCommand

public abstract void execCommand (ICommandScheduler.IScheduledInvocationListener listener, 
                String[] args)

デバイスを直接割り当てて、コマンドキューに追加せずにコマンドを実行します。

パラメータ
listener ICommandScheduler.IScheduledInvocationListener: 通知対象の ICommandScheduler.IScheduledInvocationListener

args String: コマンド引数

例外
ConfigurationException if コマンドが無効な場合
NoDeviceException 使用するデバイスがない場合に

execCommand

public abstract void execCommand (ICommandScheduler.IScheduledInvocationListener listener, 
                ITestDevice device, 
                String[] args)

すでに割り当てられているデバイスでコマンドを直接実行します。

パラメータ
listener ICommandScheduler.IScheduledInvocationListener: 通知対象の ICommandScheduler.IScheduledInvocationListener

device ITestDevice: 使用する ITestDevice

args String: コマンド引数

例外
ConfigurationException if コマンドが無効な場合

getCommandFileWatcher

public abstract CommandFileWatcher getCommandFileWatcher ()

このスケジューラに適した CommandFileWatcher を取得する

戻り値
CommandFileWatcher

getExecutingCommandCount

public abstract int getExecutingCommandCount ()

実行状態のコマンドの数を返します。

戻り値
int

getInvocationInfo

public abstract String getInvocationInfo (int invocationId)

呼び出し ID を指定して呼び出し bu の情報を返します。

パラメータ
invocationId int: 呼び出しのトラッキング ID。

戻り値
String 呼び出しに関する情報を含む String

getLastInvocationExitCode

public abstract CommandRunner.ExitCode getLastInvocationExitCode ()

最後に実行された呼び出しのエラーコードを返します。 呼び出しがまだ実行されていない場合は、0(エラーなし)を返します。

戻り値
CommandRunner.ExitCode

getLastInvocationThrowable

public abstract Throwable getLastInvocationThrowable ()

最後に実行された呼び出しから Throwable を返します。 スローアブルが利用できない場合は null を返します。

戻り値
Throwable

getReadyCommandCount

public abstract int getReadyCommandCount ()

キュー内の準備完了状態のコマンドの数を返します。

戻り値
int

HandoverInitiationComplete

public abstract void handoverInitiationComplete ()

使用中のデバイスとコマンドの初期ハンドオーバー交換をコマンド スケジューラに通知する オペレーションのスケジューリングを開始できます。

handshake シャットダウン

public abstract boolean handoverShutdown (int handoverPort)

shutdown() を開始し、この同じホスト上の別の tradefed プロセスにハンドオーバーします。

スケジューラは、解放されたデバイスのそのポートをリッスンしているリモート tradefed プロセスに通知します。 自動的に適用されます。

パラメータ
handoverPort int

戻り値
boolean ハンドオーバーの開始が成功した場合は truefalse

join

public abstract void join ()

スケジューラが完了するまで待機します。

関連項目:

join

public abstract void join (long millis)

ミリ秒単位で指定された期間が経過したら、スケジューラが完了するかタイムアウトするのを待ちます。

パラメータ
millis long

関連項目:

deleteAllCommands

public abstract void removeAllCommands ()

スケジューラからすべてのコマンドを削除

setClearcutClient

public abstract void setClearcutClient (ClearcutClient client)

ハーネスデータを報告するようにクライアントを設定する

パラメータ
client ClearcutClient

shouldShutdownOnCmdfileError エラー

public abstract boolean shouldShutdownOnCmdfileError ()

コマンドエラーでスケジューラをシャットダウンする必要がある場合は true を返す

戻り値
boolean

シャットダウン

public abstract void shutdown ()

コマンド スケジューラを正常にシャットダウンしてみます。

テストを待機しているコマンドを消去し、進行中のすべての呼び出しを要求する 正常にシャットダウンします。

シャットダウンが呼び出されると、スケジューラのメインループは、進行中のすべての呼び出しを待機します。 完了するまで待つ必要はありません

shutdownHard

public abstract void shutdownHard (boolean killAdb)

コマンド スケジューラの強制シャットダウンを試みます。

shutdown() に似ていますが、必要に応じて 「インスピレーション」をより迅速に完了できるようになります。

パラメータ
killAdb boolean

shutdownHard

public abstract void shutdownHard ()

コマンド スケジューラの強制シャットダウンを試みます。shutdownHard(true) と同じです。

shutdownOnEmpty

public abstract void shutdownOnEmpty ()

shutdown() に似ていますが、すべてのコマンドの実行を待機します。 終了です。

いずれかのコマンドがループモードの場合、スケジューラは終了しません。

start

public abstract void start ()

ICommandScheduler を起動します。

他のメソッドを呼び出す前に呼び出す必要があります。

shutdown() が呼び出されるまで実行されます。 Thread.start() をご覧ください。

stopInvocation

public abstract boolean stopInvocation (int invocationId, 
                String cause)

ID を指定して実行中の呼び出しを停止します。

パラメータ
invocationId int: 呼び出しのトラッキング ID。

cause String: 呼び出しを停止する原因。

戻り値
boolean 呼び出しが停止した場合は true、それ以外の場合は false

例外
UnsupportedOperationException 実装でサポートされていない場合は

stopInvocation

public boolean stopInvocation (int invocationId)

ID を指定して実行中の呼び出しを停止します。

パラメータ
invocationId int

戻り値
boolean 呼び出しが停止した場合は true、それ以外の場合は false

例外
UnsupportedOperationException 実装でサポートされていない場合は

stopInvocation

public abstract boolean stopInvocation (ITestInvocation invocation)

実行中の呼び出しを停止します。

パラメータ
invocation ITestInvocation

戻り値
boolean 呼び出しが停止した場合は true、それ以外の場合は false

例外
UnsupportedOperationException 実装でサポートされていない場合は