InvocationContext
public
class
InvocationContext
extends Object
implements
IInvocationContext
| java.lang.Object | |
| ↳ | com.android.tradefed.invoker.InvocationContext |
Generische Implementierung einer IInvocationContext.
Zusammenfassung
Öffentliche Konstruktoren | |
|---|---|
InvocationContext()
Erstellt einen |
|
Öffentliche Methoden | |
|---|---|
void
|
addAllocatedDevice(
|
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,
|
static
InvocationContext
|
fromProto(InvocationContext.Context protoContext)
Führen Sie den umgekehrten Vorgang zu |
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()
Sperren Sie den Kontext, um zu verhindern, dass weitere Aufrufattribute hinzugefügt werden. |
void
|
logInvocationMetrics()
Protokollieren Sie die |
void
|
markReleasedEarly()
|
void
|
setConfigurationDescriptor(ConfigurationDescriptor configurationDescriptor)
|
void
|
setModuleInvocationContext(IInvocationContext invocationContext)
|
void
|
setRecoveryModeForAllDevices(ITestDevice.RecoveryMode mode)
|
void
|
setTestTag(String testTag)
|
InvocationContext.Context
|
toProto()
|
boolean
|
wasReleasedEarly()
|
Öffentliche Konstruktoren
Öffentliche Methoden
addAllocatedDevice
public void addAllocatedDevice (deviceWithName)
| Parameter | |
|---|---|
deviceWithName |
|
addAllocatedDevice
public void addAllocatedDevice (String devicename,
ITestDevice testDevice)
| Parameter | |
|---|---|
devicename |
String |
testDevice |
ITestDevice |
addDeviceBuildInfo
public void addDeviceBuildInfo (String deviceName,
IBuildInfo buildinfo)
| Parameter | |
|---|---|
deviceName |
String |
buildinfo |
IBuildInfo |
addInvocationAttribute
public void addInvocationAttribute (String attributeName,
String attributeValue)
| Parameter | |
|---|---|
attributeName |
String |
attributeValue |
String |
addInvocationAttributes
public void addInvocationAttributes (MultiMap<String, String> attributesMap)
| Parameter | |
|---|---|
attributesMap |
MultiMap |
addSerialsFromShard
public void addSerialsFromShard (Integer index,
serials)
| Parameter | |
|---|---|
index |
Integer |
serials |
|
fromProto
public static InvocationContext fromProto (InvocationContext.Context protoContext)
Führen Sie den umgekehrten Vorgang zu InvocationContext#toProto() aus, um die Instanz wiederherzustellen.
| Parameter | |
|---|---|
protoContext |
InvocationContext.Context |
| Returns | |
|---|---|
InvocationContext |
|
getAttributes
public MultiMap<String, String> getAttributes ()
| Returns | |
|---|---|
MultiMap<String, String> |
|
getBuildInfo
public IBuildInfo getBuildInfo (String deviceName)
| Parameter | |
|---|---|
deviceName |
String |
| Returns | |
|---|---|
IBuildInfo |
|
getBuildInfo
public IBuildInfo getBuildInfo (ITestDevice testDevice)
| Parameter | |
|---|---|
testDevice |
ITestDevice |
| Returns | |
|---|---|
IBuildInfo |
|
getBuildInfoName
public String getBuildInfoName (IBuildInfo info)
| Parameter | |
|---|---|
info |
IBuildInfo |
| Returns | |
|---|---|
String |
|
getBuildInfos
publicgetBuildInfos ()
| Returns | |
|---|---|
|
|
getConfigurationDescriptor
public ConfigurationDescriptor getConfigurationDescriptor ()
| Returns | |
|---|---|
ConfigurationDescriptor |
|
getDevice
public ITestDevice getDevice (String deviceName)
| Parameter | |
|---|---|
deviceName |
String |
| Returns | |
|---|---|
ITestDevice |
|
getDeviceBuildMap
publicgetDeviceBuildMap ()
| Returns | |
|---|---|
|
|
getDeviceBySerial
public ITestDevice getDeviceBySerial (String serial)
| Parameter | |
|---|---|
serial |
String |
| Returns | |
|---|---|
ITestDevice |
|
getDeviceConfigNames
publicgetDeviceConfigNames ()
| Returns | |
|---|---|
|
|
getDeviceName
public String getDeviceName (ITestDevice device)
| Parameter | |
|---|---|
device |
ITestDevice |
| Returns | |
|---|---|
String |
|
getDevices
publicgetDevices ()
| Returns | |
|---|---|
|
|
getInvocationId
public String getInvocationId ()
| Returns | |
|---|---|
String |
|
getModuleInvocationContext
public IInvocationContext getModuleInvocationContext ()
| Returns | |
|---|---|
IInvocationContext |
|
getNumDevicesAllocated
public int getNumDevicesAllocated ()
| Returns | |
|---|---|
int |
|
getSerials
publicgetSerials ()
| Returns | |
|---|---|
|
|
getShardsSerials
publicgetShardsSerials ()
| Returns | |
|---|---|
|
|
getTestTag
public String getTestTag ()
| Returns | |
|---|---|
String |
|
lockAttributes
public void lockAttributes ()
Sperren Sie den Kontext, um zu verhindern, dass weitere Aufrufattribute hinzugefügt werden.
logInvocationMetrics
public void logInvocationMetrics ()
Protokollieren Sie die InvocationMetricLogger-Attribute für die Aufrufe.
markReleasedEarly
public void markReleasedEarly ()
setConfigurationDescriptor
public void setConfigurationDescriptor (ConfigurationDescriptor configurationDescriptor)
| Parameter | |
|---|---|
configurationDescriptor |
ConfigurationDescriptor |
setModuleInvocationContext
public void setModuleInvocationContext (IInvocationContext invocationContext)
| Parameter | |
|---|---|
invocationContext |
IInvocationContext |
setRecoveryModeForAllDevices
public void setRecoveryModeForAllDevices (ITestDevice.RecoveryMode mode)
| Parameter | |
|---|---|
mode |
ITestDevice.RecoveryMode |
setTestTag
public void setTestTag (String testTag)
| Parameter | |
|---|---|
testTag |
String |
toProto
public InvocationContext.Context toProto ()
| Returns | |
|---|---|
InvocationContext.Context |
|
wasReleasedEarly
public boolean wasReleasedEarly ()
| Returns | |
|---|---|
boolean |
|