叫用內容
public
class
InvocationContext
extends Object
implements
IInvocationContext
java.lang.Object | |
↳ | com.android.tradefed.invoker.InvocationContext |
IInvocationContext
的一般實作。
摘要
公用建構函式 | |
---|---|
InvocationContext()
使用預設屬性值建立 |
公用方法 | |
---|---|
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)
對 |
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()
將 |
void
|
markReleasedEarly()
|
void
|
setConfigurationDescriptor(ConfigurationDescriptor configurationDescriptor)
|
void
|
setModuleInvocationContext(IInvocationContext invocationContext)
|
void
|
setRecoveryModeForAllDevices(ITestDevice.RecoveryMode mode)
|
void
|
setTestTag(String testTag)
|
InvocationContext.Context
|
toProto()
|
boolean
|
wasReleasedEarly()
|
公用建構函式
公用方法
addAllocationsDevice
public void addAllocatedDevice (deviceWithName)
參數 | |
---|---|
deviceWithName |
|
addAllocationsDevice
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 |
|
fromProto
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
publicgetBuildInfos ()
傳回 | |
---|---|
|
getConfigurationDescriptor
public ConfigurationDescriptor getConfigurationDescriptor ()
傳回 | |
---|---|
ConfigurationDescriptor |
getDevice
public ITestDevice getDevice (String deviceName)
參數 | |
---|---|
deviceName |
String |
傳回 | |
---|---|
ITestDevice |
getDeviceBuildMap
publicgetDeviceBuildMap ()
傳回 | |
---|---|
|
getDeviceBySerial
public ITestDevice getDeviceBySerial (String serial)
參數 | |
---|---|
serial |
String |
傳回 | |
---|---|
ITestDevice |
getDeviceConfigNames
publicgetDeviceConfigNames ()
傳回 | |
---|---|
|
getDeviceName
public String getDeviceName (ITestDevice device)
參數 | |
---|---|
device |
ITestDevice |
傳回 | |
---|---|
String |
get 裝置
publicgetDevices ()
傳回 | |
---|---|
|
getInvocationId
public String getInvocationId ()
傳回 | |
---|---|
String |
getModuleInvocationContext
public IInvocationContext getModuleInvocationContext ()
傳回 | |
---|---|
IInvocationContext |
getNumDeviceAllocations
public int getNumDevicesAllocated ()
傳回 | |
---|---|
int |
getSerials
publicgetSerials ()
傳回 | |
---|---|
|
getShardsSerials
publicgetShardsSerials ()
傳回 | |
---|---|
|
getTestTag
public String getTestTag ()
傳回 | |
---|---|
String |
鎖定屬性
public void lockAttributes ()
鎖定結構定義,即可避免加入更多叫用屬性。
MarkReleasedEarly
public void markReleasedEarly ()
setConfigurationDescriptor
public void setConfigurationDescriptor (ConfigurationDescriptor configurationDescriptor)
參數 | |
---|---|
configurationDescriptor |
ConfigurationDescriptor |
setModuleInvocationContext
public void setModuleInvocationContext (IInvocationContext invocationContext)
參數 | |
---|---|
invocationContext |
IInvocationContext |
setRecoveryModeForAllDevice
public void setRecoveryModeForAllDevices (ITestDevice.RecoveryMode mode)
參數 | |
---|---|
mode |
ITestDevice.RecoveryMode |
setTestTag
public void setTestTag (String testTag)
參數 | |
---|---|
testTag |
String |
通訊協定
public InvocationContext.Context toProto ()
傳回 | |
---|---|
InvocationContext.Context |
提早發布
public boolean wasReleasedEarly ()
傳回 | |
---|---|
boolean |