콘솔
public class Console
extends Object
java.lang.객체 | |
↳ | com.android.tradefed.command.Console |
사용자에게 상호 작용할 수 있는 인터페이스를 제공하는 기본 TradeFederation 콘솔
현재 다음과 같은 작업을 지원합니다.
- 테스트할 명령 추가
- 장치 및 해당 상태 나열
- 진행 중인 호출 나열
- 대기열의 명령 나열
- file/stdout에 호출 로그 덤프
- 일시 휴업
요약
중첩 클래스 | |
---|---|
class | Console.ArgRunnable <T> 인수를 취할 수 있는 |
class | Console.CaptureList |
필드 | |
---|---|
protected static final String | DEBUG_PATTERN |
protected static final String | DUMP_PATTERN |
protected static final String | EXIT_PATTERN |
protected static final String | HELP_PATTERN |
protected static final String | INVOC_PATTERN |
protected static final String | LINE_SEPARATOR |
protected static final String | LIST_COMMANDS_PATTERN |
protected static final String | LIST_PATTERN |
protected static final String | REMOVE_PATTERN |
protected static final String | RUN_PATTERN |
protected static final String | SET_PATTERN |
protected static final String | VERSION_PATTERN |
protected LineReader | mConsoleReader |
protected IKeyStoreFactory | mKeyStoreFactory |
protected ICommandScheduler | mScheduler
|
보호된 생성자 | |
---|---|
Console () |
공개 방법 | |
---|---|
static void | main (String[] mainArgs) |
void | run () 콘솔을 시작하는 주요 방법입니다. |
void | setArgs ( mainArgs) setArgs ( mainArgs) 콘솔 시작 인수를 설정합니다. |
static void | startConsole ( Console console, String[] args) 지정된 인수로 지정된 Tradefed 콘솔을 시작합니다. |
보호된 메서드 | |
---|---|
String | getConsolePrompt () |
String | getGenericHelpString ( genericHelp) getGenericHelpString ( genericHelp) 표시할 일반 도움말 문자열을 반환합니다. |
static LineReader | getReader () 새 LineReader를 반환하거나 IOException이 발생하면 |
void | printLine (String output) 콘솔에 텍스트 줄 표시 |
void | printLine (String output, PrintStream pw) Printwriter에 라인 인쇄 |
void | setCustomCommands ( RegexTrie <Runnable> trie, genericHelp, commandHelp) setCustomCommands ( RegexTrie <Runnable> trie, genericHelp, commandHelp) setCustomCommands ( RegexTrie <Runnable> trie, genericHelp, commandHelp) 서브클래스가 콘솔에서 사용할 수 있는 명령을 변경하는 데 사용할 수 있는 사용자 지정 지점입니다. |
필드
디버그_패턴
protected static final String DEBUG_PATTERN
덤프_패턴
protected static final String DUMP_PATTERN
종료_패턴
protected static final String EXIT_PATTERN
도움말_패턴
protected static final String HELP_PATTERN
INVOC_PATTERN
protected static final String INVOC_PATTERN
LINE_SEPARATOR
protected static final String LINE_SEPARATOR
LIST_COMMANDS_PATTERN
protected static final String LIST_COMMANDS_PATTERN
목록_패턴
protected static final String LIST_PATTERN
제거_패턴
protected static final String REMOVE_PATTERN
런_패턴
protected static final String RUN_PATTERN
설정_패턴
protected static final String SET_PATTERN
버전_패턴
protected static final String VERSION_PATTERN
mConsoleReader
protected LineReader mConsoleReader
mKeyStoreFactory
protected IKeyStoreFactory mKeyStoreFactory
보호된 생성자
콘솔
protected Console ()
공개 방법
달리다
public void run ()
콘솔을 시작하는 주요 방법입니다. 종료 명령이 내려질 때까지 계속 실행됩니다.
setArgs
public void setArgs (mainArgs)
콘솔 시작 인수를 설정합니다.
매개변수 | |
---|---|
mainArgs |
시작콘솔
public static void startConsole (Console console, String[] args)
지정된 인수로 지정된 Tradefed 콘솔을 시작합니다.
매개변수 | |
---|---|
console | Console : 시작할 Console |
args | String : 명령줄 인수 |
던지기 | |
---|---|
ConfigurationException |
보호된 메서드
getGenericHelpString
protected String getGenericHelpString (genericHelp)
표시할 일반 도움말 문자열을 반환합니다.
매개변수 | |
---|---|
genericHelp | String 목록입니다. |
보고 | |
---|---|
String |
getReader
protected static LineReader getReader ()
새 LineReader를 반환하거나 IOException이 발생하면 null
반환합니다. 이 함수는 슈퍼클래스 생성자보다 먼저 실행할 수 있도록 정적이어야 합니다.
보고 | |
---|---|
LineReader |
printLine
protected void printLine (String output)
콘솔에 텍스트 줄 표시
printLine
protected void printLine (String output, PrintStream pw)
Printwriter에 라인 인쇄
매개변수 | |
---|---|
pw | PrintStream |
setCustomCommands
protected void setCustomCommands (RegexTrie<Runnable> trie,genericHelp, commandHelp)
서브클래스가 콘솔에서 사용할 수 있는 명령을 변경하는 데 사용할 수 있는 사용자 지정 지점입니다.
구현은 추가, 수정 또는 제거했을 수 있는 기능을 문서화하기 위해 genericHelp
및 commandHelp
변수를 수정해야 합니다.
매개변수 | |
---|---|
trie | RegexTrie : 명령을 추가할 RegexTrie |
genericHelp | ERROR(/List) 입니다. |
commandHelp | ERROR(/Map) 입니다. 키는 RegexTrie 의 키로 사용할 정규식입니다. 값은 해당 명령에 대해 인쇄할 도움말 텍스트가 포함된 문자열이어야 합니다. |
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2023-07-19(UTC)