InvocationContext

public class InvocationContext
extends Object implements IInvocationContext

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


Implémentation générique d'un IInvocationContext.

Résumé

Constructeurs publics

InvocationContext()

Crée un BuildInfo à l'aide de valeurs d'attribut par défaut.

Méthodes publiques

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)

Inversez l'opération InvocationContext#toProto() pour récupérer l'instance.

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()

Verrouillez le contexte pour éviter l'ajout d'autres attributs d'appel.

void logInvocationMetrics()

Enregistrez les attributs InvocationMetricLogger dans l'appel.

void markReleasedEarly()
void setConfigurationDescriptor(ConfigurationDescriptor configurationDescriptor)

void setModuleInvocationContext(IInvocationContext invocationContext)

void setRecoveryModeForAllDevices(ITestDevice.RecoveryMode mode)

void setTestTag(String testTag)

InvocationContext.Context toProto()

boolean wasReleasedEarly()

Constructeurs publics

InvocationContext

public InvocationContext ()

Crée un BuildInfo à l'aide de valeurs d'attribut par défaut.

Méthodes publiques

addAllocatedDevice

public void addAllocatedDevice ( deviceWithName)

Paramètres
deviceWithName

addAllocatedDevice

public void addAllocatedDevice (String devicename, 
                ITestDevice testDevice)

Paramètres
devicename String

testDevice ITestDevice

addDeviceBuildInfo

public void addDeviceBuildInfo (String deviceName, 
                IBuildInfo buildinfo)

Paramètres
deviceName String

buildinfo IBuildInfo

addInvocationAttribute

public void addInvocationAttribute (String attributeName, 
                String attributeValue)

Paramètres
attributeName String

attributeValue String

addInvocationAttributes

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

Paramètres
attributesMap MultiMap

addSerialsFromShard

public void addSerialsFromShard (Integer index, 
                 serials)

Paramètres
index Integer

serials

fromProto

public static InvocationContext fromProto (InvocationContext.Context protoContext)

Inversez l'opération InvocationContext#toProto() pour récupérer l'instance.

Paramètres
protoContext InvocationContext.Context

Renvoie
InvocationContext

getAttributes

public MultiMap<String, String> getAttributes ()

Renvoie
MultiMap<String, String>

getBuildInfo

public IBuildInfo getBuildInfo (String deviceName)

Paramètres
deviceName String

Renvoie
IBuildInfo

getBuildInfo

public IBuildInfo getBuildInfo (ITestDevice testDevice)

Paramètres
testDevice ITestDevice

Renvoie
IBuildInfo

getBuildInfoName

public String getBuildInfoName (IBuildInfo info)

Paramètres
info IBuildInfo

Renvoie
String

getBuildInfos

public  getBuildInfos ()

Renvoie

getConfigurationDescriptor

public ConfigurationDescriptor getConfigurationDescriptor ()

Renvoie
ConfigurationDescriptor

getDevice

public ITestDevice getDevice (String deviceName)

Paramètres
deviceName String

Renvoie
ITestDevice

getDeviceBuildMap

public  getDeviceBuildMap ()

Renvoie

getDeviceBySerial

public ITestDevice getDeviceBySerial (String serial)

Paramètres
serial String

Renvoie
ITestDevice

getDeviceConfigNames

public  getDeviceConfigNames ()

Renvoie

getDeviceName

public String getDeviceName (ITestDevice device)

Paramètres
device ITestDevice

Renvoie
String

getDevices

public  getDevices ()

Renvoie

getInvocationId

public String getInvocationId ()

Renvoie
String

getModuleInvocationContext

public IInvocationContext getModuleInvocationContext ()

Renvoie
IInvocationContext

getNumDevicesAllocated

public int getNumDevicesAllocated ()

Renvoie
int

getSerials

public  getSerials ()

Renvoie

getShardsSerials

public  getShardsSerials ()

Renvoie

getTestTag

public String getTestTag ()

Renvoie
String

lockAttributes

public void lockAttributes ()

Verrouillez le contexte pour éviter l'ajout d'autres attributs d'appel.

logInvocationMetrics

public void logInvocationMetrics ()

Enregistrez les attributs InvocationMetricLogger dans l'appel.

markReleasedEarly

public void markReleasedEarly ()

setConfigurationDescriptor

public void setConfigurationDescriptor (ConfigurationDescriptor configurationDescriptor)

Paramètres
configurationDescriptor ConfigurationDescriptor

setModuleInvocationContext

public void setModuleInvocationContext (IInvocationContext invocationContext)

Paramètres
invocationContext IInvocationContext

setRecoveryModeForAllDevices

public void setRecoveryModeForAllDevices (ITestDevice.RecoveryMode mode)

Paramètres
mode ITestDevice.RecoveryMode

setTestTag

public void setTestTag (String testTag)

Paramètres
testTag String

toProto

public InvocationContext.Context toProto ()

Renvoie
InvocationContext.Context

wasReleasedEarly

public boolean wasReleasedEarly ()

Renvoie
boolean