CommandInterrupter

public class CommandInterrupter
extends Object

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


TradeFederation 명령을 중단하거나 중단 불가로 표시할 수 있는 서비스입니다.

요약

필드

public static final CommandInterrupter INSTANCE

싱글톤

공개 생성자

CommandInterrupter()

공개 메서드

void allowInterrupt()

현재 스레드가 중단되도록 허용합니다.

allowInterruptAsync(Thread thread, long delay, TimeUnit unit)

지연 후 지정된 스레드가 중단되도록 허용합니다.

void blockInterrupt()

현재 스레드가 중단되지 않도록 합니다.

void checkInterrupted()

중단해야 하는 경우 현재 스레드를 중단합니다.

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

스레드를 플래그하여 중단 가능한 경우 중단합니다.

boolean isInterruptible(Thread thread)
boolean isInterruptible()

필드

인스턴스

public static final CommandInterrupter INSTANCE

싱글톤

공개 생성자

CommandInterrupter

public CommandInterrupter ()

공개 메서드

allowInterrupt

public void allowInterrupt ()

현재 스레드가 중단되도록 허용합니다.

allowInterruptAsync

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

지연 후 지정된 스레드가 중단되도록 허용합니다.

매개변수
thread Thread: 인터럽트 가능으로 표시할 스레드입니다.

delay long: 실행을 지연할 시간입니다.

unit TimeUnit: 지연 매개변수의 시간 단위

반환 값

blockInterrupt

public void blockInterrupt ()

현재 스레드가 중단되지 않도록 합니다.

checkInterrupted

public void checkInterrupted ()

중단해야 하는 경우 현재 스레드를 중단합니다. 스레드는 올바른 RunInterruptedException를 발생시키기 위해 이 메서드를 주기적으로 호출하는 것이 좋습니다.

생성 값
RunInterruptedException

인터럽트

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

스레드를 플래그하여 중단 가능한 경우 중단합니다.

매개변수
thread Thread: 중단을 표시할 스레드입니다.

message String: 중단 메시지

errorId ErrorIdentifier

isInterruptible

public boolean isInterruptible (Thread thread)

매개변수
thread Thread

반환 값
boolean 지정된 스레드가 인터럽트 가능하면 true

isInterruptible

public boolean isInterruptible ()

반환 값
boolean 현재 스레드가 중단 가능한 경우 true