콘솔
public class Console
extends Object
java.lang.Object | |
↳ | com.android.tradefed.command.Console |
사용자에게 상호 작용할 인터페이스를 제공하는 기본 TradeFederation 콘솔
현재 다음과 같은 작업을 지원합니다.
- 테스트할 명령 추가
- 장치 및 해당 상태 나열
- 진행 중인 호출 나열
- 대기열에 있는 명령 나열
- 파일/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) 인쇄기로 라인 인쇄 |
void | setCustomCommands ( RegexTrie <Runnable> trie, genericHelp, commandHelp) setCustomCommands ( RegexTrie <Runnable> trie, genericHelp, commandHelp) setCustomCommands ( RegexTrie <Runnable> trie, genericHelp, commandHelp) 서브클래스가 콘솔에서 사용할 수 있는 명령을 변경하는 데 사용할 수 있는 사용자 정의 지점입니다. |
필드
DEBUG_PATTERN
protected static final String DEBUG_PATTERN
DUMP_PATTERN
protected static final String DUMP_PATTERN
EXIT_PATTERN
protected static final String EXIT_PATTERN
HELP_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
LIST_PATTERN
protected static final String LIST_PATTERN
REMOVE_PATTERN
protected static final String REMOVE_PATTERN
런_패턴
protected static final String RUN_PATTERN
SET_PATTERN
protected static final String SET_PATTERN
VERSION_PATTERN
protected static final String VERSION_PATTERN
mConsoleReader
protected LineReader mConsoleReader
mKeyStoreFactory
protected IKeyStoreFactory mKeyStoreFactory
보호된 생성자
콘솔
protected Console ()
공개 메소드
기본
public static void main (String[] mainArgs)
매개변수 | |
---|---|
mainArgs | String |
던지기 | |
---|---|
ConfigurationException |
달리다
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)
인쇄기로 라인 인쇄
매개변수 | |
---|---|
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-12-01(UTC)