CommandInterrupter

public class CommandInterrupter
extends Object

java.lang.Object
   ↳ com.android.tradefed.command.CommandInterrupter


Service permettant d'interrompre ou de marquer comme non interruptibles les commandes TradeFederation.

Résumé

Champs

public static final CommandInterrupter INSTANCE

Singleton.

Constructeurs publics

CommandInterrupter()

Méthodes publiques

void allowInterrupt()

Autorisez l'interruption du thread en cours.

allowInterruptAsync(Thread thread, long delay, TimeUnit unit)

Autorisez l'interruption d'un thread spécifié après un délai.

void blockInterrupt()

Empêcher l'interruption du thread actuel.

void checkInterrupted()

Interrompt le thread en cours si nécessaire.

void interrupt(Thread thread, String message, ErrorIdentifier errorId)

Signalez un thread et interrompez-le s'il devient interruptible.

boolean isInterruptible(Thread thread)
boolean isInterruptible()

Champs

INSTANCE

public static final CommandInterrupter INSTANCE

Singleton.

Constructeurs publics

CommandInterrupter

public CommandInterrupter ()

Méthodes publiques

allowInterrupt

public void allowInterrupt ()

Autorisez l'interruption du thread en cours.

allowInterruptAsync

public  allowInterruptAsync (Thread thread, 
                long delay, 
                TimeUnit unit)

Autorisez l'interruption d'un thread spécifié après un délai.

Paramètres
thread Thread: thread à marquer comme interruptible

delay long: délai d'exécution à partir de maintenant

unit TimeUnit: unité de temps du paramètre de délai

Renvoie

blockInterrupt

public void blockInterrupt ()

Empêcher l'interruption du thread actuel.

checkInterrupted

public void checkInterrupted ()

Interrompt le thread en cours si nécessaire. Les threads sont invités à appeler régulièrement cette méthode afin de générer le RunInterruptedException approprié.

Génère
RunInterruptedException

interruption

public void interrupt (Thread thread, 
                String message, 
                ErrorIdentifier errorId)

Signalez un thread et interrompez-le s'il devient interruptible.

Paramètres
thread Thread: thread à marquer pour interruption

message String: message d'interruption

errorId ErrorIdentifier

isInterruptible

public boolean isInterruptible (Thread thread)

Paramètres
thread Thread

Renvoie
boolean "true" si le thread spécifié est interruptible

isInterruptible

public boolean isInterruptible ()

Renvoie
boolean "True" si le thread actuel peut être interrompu