public class AdbController extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AdbController.AdbException |
static class |
AdbController.Environment |
| Modifier and Type | Field and Description |
|---|---|
static org.echocat.jomon.runtime.util.Duration |
DISPLAY_COUNTDOWN_AFTER |
| Constructor and Description |
|---|
AdbController() |
| Modifier and Type | Method and Description |
|---|---|
static AdbController |
adbController() |
protected void |
cleanupConsoleIfNeeded(AdbController.Environment environment,
AtomicInteger cleanupConsoleLength) |
protected void |
cleanupConsoleIfNeeded(AdbController.Environment environment,
int cleanupConsoleLength) |
protected void |
displayAdbCountdownIfNeeded(AdbController.Environment environment,
org.echocat.jomon.runtime.concurrent.StopWatch stopWatch,
AtomicInteger cleanupConsoleLength) |
protected void |
displayDeviceCountdownIfNeeded(AdbController.Environment environment,
org.echocat.jomon.runtime.concurrent.StopWatch stopWatch,
AtomicInteger cleanupConsoleLength) |
void |
doWithDevices(AdbController.Environment environment,
org.echocat.jomon.runtime.util.Consumer<com.android.ddmlib.IDevice,Exception> deviceConsumer) |
protected com.android.ddmlib.AndroidDebugBridge |
getAdbFor(AdbController.Environment environment) |
protected Collection<com.android.ddmlib.IDevice> |
getDevicesFor(AdbController.Environment environment,
com.android.ddmlib.AndroidDebugBridge adb) |
protected Collection<com.android.ddmlib.IDevice> |
getDevicesFor(AdbController.Environment environment,
com.android.ddmlib.AndroidDebugBridge adb,
org.echocat.jomon.runtime.util.Duration timeout) |
protected Collection<com.android.ddmlib.IDevice> |
getDevicesFor(AdbController.Environment environment,
org.echocat.jomon.runtime.concurrent.StopWatch stopWatch) |
static AdbController |
getInstance() |
protected org.echocat.jomon.runtime.util.Duration |
leftAdbTimeoutFor(AdbController.Environment environment,
org.echocat.jomon.runtime.concurrent.StopWatch stopWatch) |
protected org.echocat.jomon.runtime.util.Duration |
leftDeviceTimeoutFor(AdbController.Environment environment,
org.echocat.jomon.runtime.concurrent.StopWatch stopWatch) |
protected void |
logFoundDevices(Collection<com.android.ddmlib.IDevice> devices) |
protected boolean |
shouldDisplayCountdownFor(org.echocat.jomon.runtime.concurrent.StopWatch stopWatch) |
protected void |
waitFor(Iterable<Future<Void>> futures) |
protected void |
waitForInitialDeviceList(com.android.ddmlib.AndroidDebugBridge adb,
AdbController.Environment environment,
org.echocat.jomon.runtime.concurrent.StopWatch stopWatch) |
protected void |
waitUntilConnected(com.android.ddmlib.AndroidDebugBridge adb,
AdbController.Environment environment,
org.echocat.jomon.runtime.concurrent.StopWatch stopWatch) |
@Nonnull public static final org.echocat.jomon.runtime.util.Duration DISPLAY_COUNTDOWN_AFTER
@Nonnull public static AdbController getInstance()
@Nonnull public static AdbController adbController()
public void doWithDevices(@Nonnull AdbController.Environment environment, @Nonnull org.echocat.jomon.runtime.util.Consumer<com.android.ddmlib.IDevice,Exception> deviceConsumer) throws InterruptedException, Exception
InterruptedExceptionExceptionprotected void waitFor(@Nonnull Iterable<Future<Void>> futures) throws InterruptedException, Exception
InterruptedExceptionException@Nonnull protected Collection<com.android.ddmlib.IDevice> getDevicesFor(@Nonnull AdbController.Environment environment, @Nonnull org.echocat.jomon.runtime.concurrent.StopWatch stopWatch) throws TimeoutException, IOException
TimeoutExceptionIOException@Nonnull protected Collection<com.android.ddmlib.IDevice> getDevicesFor(@Nonnull AdbController.Environment environment, @Nonnull com.android.ddmlib.AndroidDebugBridge adb, @Nonnull org.echocat.jomon.runtime.util.Duration timeout) throws TimeoutException, IOException
TimeoutExceptionIOExceptionprotected void logFoundDevices(@Nonnull Collection<com.android.ddmlib.IDevice> devices)
@Nonnull protected Collection<com.android.ddmlib.IDevice> getDevicesFor(@Nonnull AdbController.Environment environment, @Nonnull com.android.ddmlib.AndroidDebugBridge adb)
@Nonnull protected com.android.ddmlib.AndroidDebugBridge getAdbFor(@Nonnull AdbController.Environment environment) throws TimeoutException, IOException
TimeoutExceptionIOExceptionprotected void waitUntilConnected(@Nonnull com.android.ddmlib.AndroidDebugBridge adb, @Nonnull AdbController.Environment environment, @Nonnull org.echocat.jomon.runtime.concurrent.StopWatch stopWatch) throws TimeoutException, IOException
TimeoutExceptionIOExceptionprotected void waitForInitialDeviceList(@Nonnull com.android.ddmlib.AndroidDebugBridge adb, @Nonnull AdbController.Environment environment, @Nonnull org.echocat.jomon.runtime.concurrent.StopWatch stopWatch) throws TimeoutException, IOException
TimeoutExceptionIOExceptionprotected void displayDeviceCountdownIfNeeded(@Nonnull AdbController.Environment environment, @Nonnull org.echocat.jomon.runtime.concurrent.StopWatch stopWatch, @Nonnull AtomicInteger cleanupConsoleLength) throws IOException
IOExceptionprotected void displayAdbCountdownIfNeeded(@Nonnull AdbController.Environment environment, @Nonnull org.echocat.jomon.runtime.concurrent.StopWatch stopWatch, @Nonnull AtomicInteger cleanupConsoleLength) throws IOException
IOExceptionprotected boolean shouldDisplayCountdownFor(@Nonnull org.echocat.jomon.runtime.concurrent.StopWatch stopWatch)
protected void cleanupConsoleIfNeeded(@Nonnull AdbController.Environment environment, @Nonnull AtomicInteger cleanupConsoleLength) throws IOException
IOExceptionprotected void cleanupConsoleIfNeeded(@Nonnull AdbController.Environment environment, @Nonnull int cleanupConsoleLength) throws IOException
IOException@Nonnull protected org.echocat.jomon.runtime.util.Duration leftAdbTimeoutFor(@Nonnull AdbController.Environment environment, @Nonnull org.echocat.jomon.runtime.concurrent.StopWatch stopWatch)
@Nonnull protected org.echocat.jomon.runtime.util.Duration leftDeviceTimeoutFor(@Nonnull AdbController.Environment environment, @Nonnull org.echocat.jomon.runtime.concurrent.StopWatch stopWatch)
Copyright © 2016 echocat. All rights reserved.