GceSshTunnelMonitor
public
class
GceSshTunnelMonitor
extends AbstractTunnelMonitor
java.lang.Object | ||
↳ | com.android.tradefed.device.cloud.AbstractTunnelMonitor | |
↳ | com.android.tradefed.device.cloud.GceSshTunnelMonitor |
Thread Monitor for the Gce ssh tunnel.
Summary
Fields | |
---|---|
public
static
final
String |
VIRTUAL_DEVICE_SERIAL
|
Public constructors | |
---|---|
GceSshTunnelMonitor(ITestDevice device, IBuildInfo buildInfo, HostAndPort gce, TestDeviceOptions deviceOptions)
Constructor |
Public methods | |
---|---|
void
|
closeConnection()
Close all the connections from the monitor (adb and ssh tunnel). |
Exception
|
getLastException()
Returns the last exception captured in the ssh tunnel thread. |
void
|
isAdbRebootCalled(boolean isCalled)
Set True when an adb reboot is about to be called to make sure the monitor expect it. |
boolean
|
isTunnelAlive()
Returns True if the |
void
|
logSshTunnelLogs(ITestLogger logger)
Log all the interesting log files generated from the ssh tunnel. |
void
|
run()
|
void
|
shutdown()
Terminate the tunnel monitor |
Fields
VIRTUAL_DEVICE_SERIAL
public static final String VIRTUAL_DEVICE_SERIAL
Public constructors
GceSshTunnelMonitor
public GceSshTunnelMonitor (ITestDevice device, IBuildInfo buildInfo, HostAndPort gce, TestDeviceOptions deviceOptions)
Constructor
Parameters | |
---|---|
device |
ITestDevice : ITestDevice the TF device to associate the remote GCE AVD with. |
buildInfo |
IBuildInfo |
gce |
HostAndPort : HostAndPort of the remote GCE AVD. |
deviceOptions |
TestDeviceOptions |
Public methods
closeConnection
public void closeConnection ()
Close all the connections from the monitor (adb and ssh tunnel).
getLastException
public Exception getLastException ()
Returns the last exception captured in the ssh tunnel thread.
Returns | |
---|---|
Exception |
isAdbRebootCalled
public void isAdbRebootCalled (boolean isCalled)
Set True when an adb reboot is about to be called to make sure the monitor expect it.
Parameters | |
---|---|
isCalled |
boolean |
isTunnelAlive
public boolean isTunnelAlive ()
Returns True if the GceSshTunnelMonitor
is still alive, false otherwise.
Returns | |
---|---|
boolean |
logSshTunnelLogs
public void logSshTunnelLogs (ITestLogger logger)
Log all the interesting log files generated from the ssh tunnel.
Parameters | |
---|---|
logger |
ITestLogger |
run
public void run ()
shutdown
public void shutdown ()
Terminate the tunnel monitor