调用上下文

public class InvocationContext
extends Object implements IInvocationContext

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


IInvocationContext 的通用实现。

摘要

公共构造函数

InvocationContext()

使用默认属性值创建 BuildInfo

公共方法

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)

InvocationContext#toProto() 执行反运算,以返回实例。

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

锁定上下文,以防止添加更多调用属性。

void logInvocationMetrics()

InvocationMetricLogger 属性记录到调用中。

void markReleasedEarly()
void setConfigurationDescriptor(ConfigurationDescriptor configurationDescriptor)

void setModuleInvocationContext(IInvocationContext invocationContext)

void setRecoveryModeForAllDevices(ITestDevice.RecoveryMode mode)

void setTestTag(String testTag)

InvocationContext.Context toProto()

boolean wasReleasedEarly()

公共构造函数

调用上下文

public InvocationContext ()

使用默认属性值创建 BuildInfo

公共方法

addAlallocateDevice

public void addAllocatedDevice ( deviceWithName)

参数
deviceWithName

addAlallocateDevice

public void addAllocatedDevice (String devicename, 
                ITestDevice testDevice)

参数
devicename String

testDevice ITestDevice

addDeviceBuildInfo

public void addDeviceBuildInfo (String deviceName, 
                IBuildInfo buildinfo)

参数
deviceName String

buildinfo IBuildInfo

addInvocationAttribute

public void addInvocationAttribute (String attributeName, 
                String attributeValue)

参数
attributeName String

attributeValue String

addInvocationAttributes

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

参数
attributesMap MultiMap

addSerialsFromShard

public void addSerialsFromShard (Integer index, 
                 serials)

参数
index Integer

serials

来自 Proto

public static InvocationContext fromProto (InvocationContext.Context protoContext)

InvocationContext#toProto() 执行反运算,以返回实例。

参数
protoContext InvocationContext.Context

返回
InvocationContext

getAttributes

public MultiMap<String, String> getAttributes ()

返回
MultiMap<String, String>

getBuildInfo

public IBuildInfo getBuildInfo (String deviceName)

参数
deviceName String

返回
IBuildInfo

getBuildInfo

public IBuildInfo getBuildInfo (ITestDevice testDevice)

参数
testDevice ITestDevice

返回
IBuildInfo

getBuildInfoName

public String getBuildInfoName (IBuildInfo info)

参数
info IBuildInfo

返回
String

getBuildInfo

public  getBuildInfos ()

返回

getConfigurationDescriptor

public ConfigurationDescriptor getConfigurationDescriptor ()

返回
ConfigurationDescriptor

getDevice

public ITestDevice getDevice (String deviceName)

参数
deviceName String

返回
ITestDevice

getDeviceBuildMap

public  getDeviceBuildMap ()

返回

getDeviceBySerial

public ITestDevice getDeviceBySerial (String serial)

参数
serial String

返回
ITestDevice

getDeviceConfigNames

public  getDeviceConfigNames ()

返回

getDeviceName

public String getDeviceName (ITestDevice device)

参数
device ITestDevice

返回
String

getDevices

public  getDevices ()

返回

getInvocationId

public String getInvocationId ()

返回
String

getModuleInvocationContext

public IInvocationContext getModuleInvocationContext ()

返回
IInvocationContext

getNumDevicesAl 点击广告

public int getNumDevicesAllocated ()

返回
int

getSerials

public  getSerials ()

返回

getShardsSerials

public  getShardsSerials ()

返回

getTestTag

public String getTestTag ()

返回
String

lockAttributes

public void lockAttributes ()

锁定上下文,以防止添加更多调用属性。

logInvocationMetrics

public void logInvocationMetrics ()

InvocationMetricLogger 属性记录到调用中。

MarkReleasedEarly

public void markReleasedEarly ()

setConfigurationDescriptor

public void setConfigurationDescriptor (ConfigurationDescriptor configurationDescriptor)

参数
configurationDescriptor ConfigurationDescriptor

setModuleInvocationContext

public void setModuleInvocationContext (IInvocationContext invocationContext)

参数
invocationContext IInvocationContext

setRecoveryModeForAllDevices

public void setRecoveryModeForAllDevices (ITestDevice.RecoveryMode mode)

参数
mode ITestDevice.RecoveryMode

setTestTag

public void setTestTag (String testTag)

参数
testTag String

ToProto

public InvocationContext.Context toProto ()

返回
InvocationContext.Context

提前发布

public boolean wasReleasedEarly ()

返回
boolean