DefaultConnection

public class DefaultConnection
extends AbstractConnection

java.lang.Object
   ↳ com.android.tradefed.device.connection.AbstractConnection
     ↳ com.android.tradefed.device.connection.DefaultConnection


Default connection representation of a device, assumed to be a standard adb connection of the device.

Summary

Nested classes

class DefaultConnection.ConnectionBuilder

Builder used to described the connection. 

Protected constructors

DefaultConnection(DefaultConnection.ConnectionBuilder builder)

Constructor

Public methods

static DefaultConnection createConnection(DefaultConnection.ConnectionBuilder builder)

Create the requested connection.

static DefaultConnection createInopConnection(DefaultConnection.ConnectionBuilder builder)
final MultiMap<String, String> getAttributes()
final IBuildInfo getBuildInfo()
final ITestDevice getDevice()
Integer getInitialDeviceNumOffset()

Returns the known device num offset if any.

String getInitialIp()

Returns the initial associated ip to the device if any.

String getInitialSerial()

Returns the initial serial name of the device.

String getInitialUser()

Returns the initial known user if any.

ITestLogger getLogger()

Returns the ITestLogger to log files.

boolean wasTemporaryHolder()

Protected methods

IRunUtil getRunUtil()

Returns IRunUtil to execute commands.

Protected constructors

DefaultConnection

protected DefaultConnection (DefaultConnection.ConnectionBuilder builder)

Constructor

Parameters
builder DefaultConnection.ConnectionBuilder

Public methods

createConnection

public static DefaultConnection createConnection (DefaultConnection.ConnectionBuilder builder)

Create the requested connection.

Parameters
builder DefaultConnection.ConnectionBuilder

Returns
DefaultConnection

createInopConnection

public static DefaultConnection createInopConnection (DefaultConnection.ConnectionBuilder builder)

Parameters
builder DefaultConnection.ConnectionBuilder

Returns
DefaultConnection

getAttributes

public final MultiMap<String, String> getAttributes ()

Returns
MultiMap<String, String>

getBuildInfo

public final IBuildInfo getBuildInfo ()

Returns
IBuildInfo

getDevice

public final ITestDevice getDevice ()

Returns
ITestDevice

getInitialDeviceNumOffset

public Integer getInitialDeviceNumOffset ()

Returns the known device num offset if any. Returns null if not available.

Returns
Integer

getInitialIp

public String getInitialIp ()

Returns the initial associated ip to the device if any. Returns null if no known initial ip.

Returns
String

getInitialSerial

public String getInitialSerial ()

Returns the initial serial name of the device.

Returns
String

getInitialUser

public String getInitialUser ()

Returns the initial known user if any. Returns null if no initial known user.

Returns
String

getLogger

public ITestLogger getLogger ()

Returns the ITestLogger to log files.

Returns
ITestLogger

wasTemporaryHolder

public boolean wasTemporaryHolder ()

Returns
boolean

Protected methods

getRunUtil

protected IRunUtil getRunUtil ()

Returns IRunUtil to execute commands.

Returns
IRunUtil