Google 致力于为黑人社区推动种族平等。查看具体举措
此页面由 Cloud Translation API 翻译。
Switch to English

调用上下文

public class InvocationContext
extends Object implements IInvocationContext

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


IInvocationContext通用实现。

概要

公共建设者

InvocationContext ()

使用默认属性值创建BuildInfo

公开方法

void addAllocatedDevice ( deviceWithName) 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) 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

公开方法

addAllocatedDevice

public void addAllocatedDevice ( deviceWithName)

参量
deviceWithName

addAllocatedDevice

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

getBuildInfos

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

getNumDevicesAllocated

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