ICommandScheduler
public
interface
ICommandScheduler
com.android.tradefed.command.ICommandScheduler |
Planificateur pour l'exécution des commandes TradeFederation.
Résumé
Classes imbriquées | |
---|---|
interface |
ICommandScheduler.IScheduledInvocationListener
Paramètre "Listener" pour les événements d'appel une fois l'appel terminé |
Méthodes publiques | |
---|---|
abstract
boolean
|
addCommand(String[] args)
Ajoute une commande au planificateur. |
abstract
void
|
addCommandFile(String cmdFile,
Ajoute toutes les commandes d'un fichier donné au planificateur |
abstract
void
|
await()
Attend le démarrage du programmeur, y compris la fin du transfert de l'ancien fichier TF le cas échéant. |
abstract
void
|
completeHandover()
Informe l'ordonnanceur de commandes qu'une séquence de transfert initiée est terminée et qu'il réinitialise son gestionnaire distant sur le port par défaut. |
abstract
void
|
displayCommandQueue(PrintWriter printWriter)
Génère des informations de débogage détaillées sur l'état de la file d'attente d'exécution des commandes. |
abstract
void
|
displayCommandsInfo(PrintWriter printWriter, String regex)
Affichez la liste des commandes actuelles. |
abstract
void
|
displayInvocationsInfo(PrintWriter printWriter)
Affiche la liste des appels en cours. |
abstract
void
|
dumpCommandsXml(PrintWriter printWriter, String regex)
Videz le fichier XML développé de la commande en incluant toutes
Valeurs |
abstract
void
|
execCommand(IInvocationContext context, ICommandScheduler.IScheduledInvocationListener listener, String[] args)
Alloue directement un appareil et exécute une commande sans l'ajouter à la file d'attente de commandes
en utilisant un |
abstract
void
|
execCommand(ICommandScheduler.IScheduledInvocationListener listener, String[] args)
Il alloue directement un appareil et exécute une commande sans l'ajouter à la file d'attente de commandes. |
abstract
void
|
execCommand(ICommandScheduler.IScheduledInvocationListener listener, ITestDevice device, String[] args)
Exécutez directement la commande sur l'appareil déjà alloué. |
abstract
CommandFileWatcher
|
getCommandFileWatcher()
Obtenir le |
abstract
int
|
getExecutingCommandCount()
Renvoie le nombre de commandes en cours d'exécution. |
abstract
String
|
getInvocationInfo(int invocationId)
Renvoyez les informations sur un bu d'appel en spécifiant l'ID d'appel. |
abstract
CommandRunner.ExitCode
|
getLastInvocationExitCode()
Renvoyez le code d'erreur du dernier appel exécuté. |
abstract
Throwable
|
getLastInvocationThrowable()
Renvoyez la valeur |
abstract
int
|
getReadyCommandCount()
Renvoie le nombre de commandes à l'état prêt dans la file d'attente. |
abstract
void
|
handoverInitiationComplete()
Informe le planificateur de commandes que l'échange initial de transfert des appareils et des commandes en cours d'utilisation est terminée et peut commencer l'opération de planification. |
abstract
boolean
|
handoverShutdown(int handoverPort)
Lance un |
abstract
void
|
join()
Attend l'achèvement du programmeur. |
abstract
void
|
join(long millis)
Attend que le programmeur se termine ou expire après la durée spécifiée en millisecondes. |
abstract
void
|
removeAllCommands()
Supprimer toutes les commandes du programmeur |
abstract
void
|
setClearcutClient(ClearcutClient client)
Configurer le client pour qu'il génère des rapports |
abstract
boolean
|
shouldShutdownOnCmdfileError()
Renvoyez "true" si nous devons arrêter le planificateur en cas d'erreur de commande. |
abstract
void
|
shutdown()
Tentative d'arrêt progressif du planificateur de commandes. |
abstract
void
|
shutdownHard(boolean killAdb)
Tentative d'arrêt forcé du planificateur de commandes. |
abstract
void
|
shutdownHard()
Tentative d'arrêt forcé du planificateur de commandes. |
abstract
void
|
shutdownOnEmpty()
Semblable à |
abstract
void
|
start()
Démarrez |
abstract
boolean
|
stopInvocation(int invocationId, String cause)
Arrêtez un appel en cours d'exécution en spécifiant son ID. |
default
boolean
|
stopInvocation(int invocationId)
Arrêtez un appel en cours d'exécution en spécifiant son ID. |
abstract
boolean
|
stopInvocation(ITestInvocation invocation)
Arrêtez un appel en cours d'exécution. |
Méthodes publiques
addCommand
public abstract boolean addCommand (String[] args)
Ajoute une commande au planificateur.
Une commande est essentiellement une instance d'une configuration à exécuter et ses arguments associés.
Si "--help" est spécifié dans le texte d'aide la configuration sera transmise à stdout. Sinon, la configuration sera ajoutée à la file d'attente exécuter.
Paramètres | |
---|---|
args |
String : arguments de configuration. |
Renvoie | |
---|---|
boolean |
true si la commande a bien été ajoutée |
Génère | |
---|---|
ConfigurationException |
Si la commande n'a pas pu être analysée |
addCommandFile
public abstract void addCommandFile (String cmdFile,extraArgs)
Ajoute toutes les commandes d'un fichier donné au planificateur
Paramètres | |
---|---|
cmdFile |
String : chemin d'accès au système de fichiers du fichier de commande |
extraArgs |
: une liste ERROR(/List) d'arguments String à ajouter à chaque commande analysée
à partir du fichier. Ce champ peut être vide, mais ne doit pas être nul. |
Génère | |
---|---|
ConfigurationException |
Si le fichier de commande n'a pas pu être analysé |
Voir aussi :
attendre
public abstract void await ()
Attend le démarrage du programmeur, y compris la fin du transfert de l'ancien fichier TF le cas échéant.
completeHandover
public abstract void completeHandover ()
Informe l'ordonnanceur de commandes qu'une séquence de transfert initiée est terminée et qu'il réinitialise son gestionnaire distant sur le port par défaut.
displayCommandQueue
public abstract void displayCommandQueue (PrintWriter printWriter)
Génère des informations de débogage détaillées sur l'état de la file d'attente d'exécution des commandes.
displayCommandsInfo
public abstract void displayCommandsInfo (PrintWriter printWriter, String regex)
Affichez la liste des commandes actuelles.
Paramètres | |
---|---|
printWriter |
PrintWriter : ERROR(/PrintWriter) vers lequel renvoyer. |
regex |
String : expression régulière à laquelle les commandes doivent être mises en correspondance pour être
imprimés. Si la valeur est nulle, toutes les commandes seront imprimées.
|
displayInvocationsInfo
public abstract void displayInvocationsInfo (PrintWriter printWriter)
Affiche la liste des appels en cours.
Paramètres | |
---|---|
printWriter |
PrintWriter : ERROR(/PrintWriter) vers lequel renvoyer.
|
dumpCommandsXml
public abstract void dumpCommandsXml (PrintWriter printWriter, String regex)
Videz le fichier XML développé de la commande en incluant toutes
Valeurs Option
spécifiées pour toutes les commandes actuelles.
Paramètres | |
---|---|
printWriter |
PrintWriter : ERROR(/PrintWriter) auquel renvoyer l'état. |
regex |
String : expression régulière à laquelle les commandes doivent être mises en correspondance pour que le
xml à vider. Si la valeur est nulle, toutes les commandes seront vidées.
|
execCommand
public abstract void execCommand (IInvocationContext context, ICommandScheduler.IScheduledInvocationListener listener, String[] args)
Alloue directement un appareil et exécute une commande sans l'ajouter à la file d'attente de commandes
en utilisant un IInvocationContext
existant.
Paramètres | |
---|---|
context |
IInvocationContext : un IInvocationContext existant. |
listener |
ICommandScheduler.IScheduledInvocationListener : ICommandScheduler.IScheduledInvocationListener à informer |
args |
String : arguments de la commande |
Génère | |
---|---|
ConfigurationException |
si la commande n'était pas valide |
NoDeviceException |
si aucun appareil n'est disponible |
execCommand
public abstract void execCommand (ICommandScheduler.IScheduledInvocationListener listener, String[] args)
Il alloue directement un appareil et exécute une commande sans l'ajouter à la file d'attente de commandes.
Paramètres | |
---|---|
listener |
ICommandScheduler.IScheduledInvocationListener : ICommandScheduler.IScheduledInvocationListener à informer |
args |
String : arguments de la commande |
Génère | |
---|---|
ConfigurationException |
si la commande n'était pas valide |
NoDeviceException |
si aucun appareil n'est disponible |
execCommand
public abstract void execCommand (ICommandScheduler.IScheduledInvocationListener listener, ITestDevice device, String[] args)
Exécutez directement la commande sur l'appareil déjà alloué.
Paramètres | |
---|---|
listener |
ICommandScheduler.IScheduledInvocationListener : ICommandScheduler.IScheduledInvocationListener à informer |
device |
ITestDevice : ITestDevice à utiliser |
args |
String : arguments de la commande |
Génère | |
---|---|
ConfigurationException |
si la commande n'était pas valide |
getCommandFileWatcher
public abstract CommandFileWatcher getCommandFileWatcher ()
Obtenir le CommandFileWatcher
approprié pour ce planificateur
Renvoie | |
---|---|
CommandFileWatcher |
getExecutingCommandCount
public abstract int getExecutingCommandCount ()
Renvoie le nombre de commandes en cours d'exécution.
Renvoie | |
---|---|
int |
getInvocationInfo
public abstract String getInvocationInfo (int invocationId)
Renvoyez les informations sur un bu d'appel en spécifiant l'ID d'appel.
Paramètres | |
---|---|
invocationId |
int : ID de suivi de l'appel. |
Renvoie | |
---|---|
String |
Une String contenant des informations sur l'appel.
|
getLastInvocationExitCode
public abstract CommandRunner.ExitCode getLastInvocationExitCode ()
Renvoyez le code d'erreur du dernier appel exécuté. Renvoyez 0 (aucune erreur) si aucune invocation n'a encore été exécutée.
Renvoie | |
---|---|
CommandRunner.ExitCode |
getLastInvocationThrowable
public abstract Throwable getLastInvocationThrowable ()
Renvoyez la valeur Throwable
du dernier appel exécuté.
Renvoie la valeur "null" si aucun Throwable n'est disponible.
Renvoie | |
---|---|
Throwable |
getReadyCommandCount
public abstract int getReadyCommandCount ()
Renvoie le nombre de commandes à l'état prêt dans la file d'attente.
Renvoie | |
---|---|
int |
HandoverInitiationComplete
public abstract void handoverInitiationComplete ()
Informe le planificateur de commandes que l'échange initial de transfert des appareils et des commandes en cours d'utilisation est terminée et peut commencer l'opération de planification.
arrêt de transfert
public abstract boolean handoverShutdown (int handoverPort)
Lance un shutdown()
et le transfert à un autre processus échangé sur ce même hôte.
Le programmeur informe le processus échangé à distance qui écoute sur ce port d'appareils libérés dès qu'elles sont disponibles.
Paramètres | |
---|---|
handoverPort |
int |
Renvoie | |
---|---|
boolean |
true si le transfert a réussi, false
sinon
|
rejoindre
public abstract void join ()
Attend l'achèvement du programmeur.
Voir aussi :
rejoindre
public abstract void join (long millis)
Attend que le programmeur se termine ou expire après la durée spécifiée en millisecondes.
Paramètres | |
---|---|
millis |
long |
Voir aussi :
removeAllCommands
public abstract void removeAllCommands ()
Supprimer toutes les commandes du programmeur
setClearcutClient
public abstract void setClearcutClient (ClearcutClient client)
Configurer le client pour qu'il génère des rapports
Paramètres | |
---|---|
client |
ClearcutClient |
doitShutdownOnCmdfileError
public abstract boolean shouldShutdownOnCmdfileError ()
Renvoyez "true" si nous devons arrêter le planificateur en cas d'erreur de commande.
Renvoie | |
---|---|
boolean |
arrêter
public abstract void shutdown ()
Tentative d'arrêt progressif du planificateur de commandes.
Efface les commandes en attente de test et demande que tous les appels en cours s'arrêter en douceur.
Une fois l'arrêt appelé, la boucle principale du programmeur attend que tous les appels soient en cours avant de quitter complètement l'application.
shutdownHard
public abstract void shutdownHard (boolean killAdb)
Tentative d'arrêt forcé du planificateur de commandes.
Semblable à shutdown()
, mais supprime également la connexion adb, dans une
pour "inspirer" d'appels en cours pour se terminer plus rapidement.
Paramètres | |
---|---|
killAdb |
boolean |
shutdownHard
public abstract void shutdownHard ()
Tentative d'arrêt forcé du planificateur de commandes. Identique à shutdownHard(true).
shutdownOnEmpty
public abstract void shutdownOnEmpty ()
Semblable à shutdown()
, mais attend que toutes les commandes soient exécutées
avant de quitter.
Notez que si des commandes sont en mode boucle, le planificateur ne se ferme jamais.
départ
public abstract void start ()
Démarrez ICommandScheduler
.
Doit être appelée avant d'appeler d'autres méthodes.
S'exécutera jusqu'à ce que shutdown()
soit appelé.
voir Thread.start()
.
arrêter l'appel
public abstract boolean stopInvocation (int invocationId, String cause)
Arrêtez un appel en cours d'exécution en spécifiant son ID.
Paramètres | |
---|---|
invocationId |
int : ID de suivi de l'appel. |
cause |
String : cause de l'arrêt de l'appel. |
Renvoie | |
---|---|
boolean |
"true" si l'appel a été arrêté, "false" dans le cas contraire |
Génère | |
---|---|
UnsupportedOperationException |
si l'implémentation ne permet pas |
arrêter l'appel
public boolean stopInvocation (int invocationId)
Arrêtez un appel en cours d'exécution en spécifiant son ID.
Paramètres | |
---|---|
invocationId |
int |
Renvoie | |
---|---|
boolean |
"true" si l'appel a été arrêté, "false" dans le cas contraire |
Génère | |
---|---|
UnsupportedOperationException |
si l'implémentation ne permet pas |
arrêter l'appel
public abstract boolean stopInvocation (ITestInvocation invocation)
Arrêtez un appel en cours d'exécution.
Paramètres | |
---|---|
invocation |
ITestInvocation |
Renvoie | |
---|---|
boolean |
"true" si l'appel a été arrêté, "false" dans le cas contraire |
Génère | |
---|---|
UnsupportedOperationException |
si l'implémentation ne permet pas |