InvocationContext

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

ตัวสร้างแบบสาธารณะ

InvocationContext

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

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

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

wasReleasedEarly

public boolean wasReleasedEarly ()

คิกรีเทิร์น
boolean