Contexto da Invocação

public class InvocationContext
extends Object implements IInvocationContext

java.lang.Object
   ↳ com.android.tradefed.invoker.InvocationContext.


Implementação genérica de um IInvocationContext.

Resumo

Construtores públicos

InvocationContext()

Cria um BuildInfo usando valores de atributo padrão.

Métodos públicos

void addAllocatedDevice( deviceWithName)

void addAllocatedDevice(String devicename, ITestDevice testDevice)

void addDeviceBuildInfo(String deviceName, IBuildInfo buildinfo)

void addInvocationAttribute(String attributeName, String attributeValue)

void addInvocationAttributes(MultiMap<String, String> attributesMap)

void addSerialsFromShard(Integer index, serials)

static InvocationContext fromProto(InvocationContext.Context protoContext)

Operação inversa para InvocationContext#toProto() para recuperar a instância.

MultiMap<String, String> getAttributes()

IBuildInfo getBuildInfo(String deviceName)

IBuildInfo getBuildInfo(ITestDevice testDevice)

String getBuildInfoName(IBuildInfo info)

getBuildInfos()

ConfigurationDescriptor getConfigurationDescriptor()

ITestDevice getDevice(String deviceName)

getDeviceBuildMap()

ITestDevice getDeviceBySerial(String serial)

getDeviceConfigNames()

String getDeviceName(ITestDevice device)

getDevices()

String getInvocationId()
IInvocationContext getModuleInvocationContext()

int getNumDevicesAllocated()

getSerials()

getShardsSerials()

String getTestTag()

void lockAttributes()

Bloqueie o contexto para evitar que mais atributos de invocação sejam adicionados.

void logInvocationMetrics()

Registre os atributos InvocationMetricLogger na invocação.

void markReleasedEarly()
void setConfigurationDescriptor(ConfigurationDescriptor configurationDescriptor)

void setModuleInvocationContext(IInvocationContext invocationContext)

void setRecoveryModeForAllDevices(ITestDevice.RecoveryMode mode)

void setTestTag(String testTag)

InvocationContext.Context toProto()

boolean wasReleasedEarly()

Construtores públicos

Contexto da Invocação

public InvocationContext ()

Cria um BuildInfo usando valores de atributo padrão.

Métodos públicos

addAllocationsDevice

public void addAllocatedDevice ( deviceWithName)

Parâmetros
deviceWithName

addAllocationsDevice

public void addAllocatedDevice (String devicename, 
                ITestDevice testDevice)

Parâmetros
devicename String

testDevice ITestDevice

addDeviceBuildInfo

public void addDeviceBuildInfo (String deviceName, 
                IBuildInfo buildinfo)

Parâmetros
deviceName String

buildinfo IBuildInfo

addInvocationAttribute

public void addInvocationAttribute (String attributeName, 
                String attributeValue)

Parâmetros
attributeName String

attributeValue String

addInvocationAttributes

public void addInvocationAttributes (MultiMap<String, String> attributesMap)

Parâmetros
attributesMap MultiMap

addSerialsFromShard

public void addSerialsFromShard (Integer index, 
                 serials)

Parâmetros
index Integer

serials

fromProto

public static InvocationContext fromProto (InvocationContext.Context protoContext)

Operação inversa para InvocationContext#toProto() para recuperar a instância.

Parâmetros
protoContext InvocationContext.Context

Retorna
InvocationContext

getAttributes

public MultiMap<String, String> getAttributes ()

Retorna
MultiMap<String, String>

getBuildInfo

public IBuildInfo getBuildInfo (String deviceName)

Parâmetros
deviceName String

Retorna
IBuildInfo

getBuildInfo

public IBuildInfo getBuildInfo (ITestDevice testDevice)

Parâmetros
testDevice ITestDevice

Retorna
IBuildInfo

getBuildInfoName

public String getBuildInfoName (IBuildInfo info)

Parâmetros
info IBuildInfo

Retorna
String

getBuildInfos

public  getBuildInfos ()

Retorna

getConfigurationDescriptor

public ConfigurationDescriptor getConfigurationDescriptor ()

Retorna
ConfigurationDescriptor

getDevice

public ITestDevice getDevice (String deviceName)

Parâmetros
deviceName String

Retorna
ITestDevice

getDeviceBuildMap

public  getDeviceBuildMap ()

Retorna

getDeviceBySerial

public ITestDevice getDeviceBySerial (String serial)

Parâmetros
serial String

Retorna
ITestDevice

getDeviceConfigNames

public  getDeviceConfigNames ()

Retorna

getDeviceName

public String getDeviceName (ITestDevice device)

Parâmetros
device ITestDevice

Retorna
String

getDevices

public  getDevices ()

Retorna

getInvocationId

public String getInvocationId ()

Retorna
String

getModuleInvocationContext

public IInvocationContext getModuleInvocationContext ()

Retorna
IInvocationContext

getNumDevicesAllocations

public int getNumDevicesAllocated ()

Retorna
int

getSerials

public  getSerials ()

Retorna

getShardsSerials

public  getShardsSerials ()

Retorna

getTestTag

public String getTestTag ()

Retorna
String

lockAttributes

public void lockAttributes ()

Bloqueie o contexto para evitar que mais atributos de invocação sejam adicionados.

logInvocationMetrics

public void logInvocationMetrics ()

Registre os atributos InvocationMetricLogger na invocação.

markReleasedEarly

public void markReleasedEarly ()

setConfigurationDescriptor

public void setConfigurationDescriptor (ConfigurationDescriptor configurationDescriptor)

Parâmetros
configurationDescriptor ConfigurationDescriptor

setModuleInvocationContext

public void setModuleInvocationContext (IInvocationContext invocationContext)

Parâmetros
invocationContext IInvocationContext

setRecoveryModeForAllDevices

public void setRecoveryModeForAllDevices (ITestDevice.RecoveryMode mode)

Parâmetros
mode ITestDevice.RecoveryMode

setTestTag

public void setTestTag (String testTag)

Parâmetros
testTag String

toProto

public InvocationContext.Context toProto ()

Retorna
InvocationContext.Context

wasReleasedEarly

public boolean wasReleasedEarly ()

Retorna
boolean