Contesto di chiamata
public
class
InvocationContext
extends Object
implements
IInvocationContext
java.lang.Object | |
🎞 | com.android.tradefed.invoker.InvocationContext |
Implementazione generica di un IInvocationContext
.
Riepilogo
Costruttori pubblici | |
---|---|
InvocationContext()
Crea un |
Metodi pubblici | |
---|---|
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)
Operazione inversa su |
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()
Blocca il contesto per evitare l'aggiunta di altri attributi di chiamata. |
void
|
logInvocationMetrics()
Registra gli attributi |
void
|
markReleasedEarly()
|
void
|
setConfigurationDescriptor(ConfigurationDescriptor configurationDescriptor)
|
void
|
setModuleInvocationContext(IInvocationContext invocationContext)
|
void
|
setRecoveryModeForAllDevices(ITestDevice.RecoveryMode mode)
|
void
|
setTestTag(String testTag)
|
InvocationContext.Context
|
toProto()
|
boolean
|
wasReleasedEarly()
|
Costruttori pubblici
Contesto di chiamata
public InvocationContext ()
Crea un BuildInfo
utilizzando i valori degli attributi predefiniti.
Metodi pubblici
aggiungiDispositivo Allocato
public void addAllocatedDevice (deviceWithName)
Parametri | |
---|---|
deviceWithName |
|
aggiungiDispositivo Allocato
public void addAllocatedDevice (String devicename, ITestDevice testDevice)
Parametri | |
---|---|
devicename |
String |
testDevice |
ITestDevice |
addDeviceBuildInfo
public void addDeviceBuildInfo (String deviceName, IBuildInfo buildinfo)
Parametri | |
---|---|
deviceName |
String |
buildinfo |
IBuildInfo |
addInvocationAttribute
public void addInvocationAttribute (String attributeName, String attributeValue)
Parametri | |
---|---|
attributeName |
String |
attributeValue |
String |
addInvocationAttribute
public void addInvocationAttributes (MultiMap<String, String> attributesMap)
Parametri | |
---|---|
attributesMap |
MultiMap |
addSerialsFromShard
public void addSerialsFromShard (Integer index,serials)
Parametri | |
---|---|
index |
Integer |
serials |
|
daProto
public static InvocationContext fromProto (InvocationContext.Context protoContext)
Operazione inversa su InvocationContext#toProto()
per recuperare l'istanza.
Parametri | |
---|---|
protoContext |
InvocationContext.Context |
Ritorni | |
---|---|
InvocationContext |
getAttribute
public MultiMap<String, String> getAttributes ()
Ritorni | |
---|---|
MultiMap<String, String> |
getBuildInfo
public IBuildInfo getBuildInfo (String deviceName)
Parametri | |
---|---|
deviceName |
String |
Ritorni | |
---|---|
IBuildInfo |
getBuildInfo
public IBuildInfo getBuildInfo (ITestDevice testDevice)
Parametri | |
---|---|
testDevice |
ITestDevice |
Ritorni | |
---|---|
IBuildInfo |
getBuildInfoName
public String getBuildInfoName (IBuildInfo info)
Parametri | |
---|---|
info |
IBuildInfo |
Ritorni | |
---|---|
String |
getBuildInfo
publicgetBuildInfos ()
Ritorni | |
---|---|
|
getConfigurationDescriptor
public ConfigurationDescriptor getConfigurationDescriptor ()
Ritorni | |
---|---|
ConfigurationDescriptor |
getDevice
public ITestDevice getDevice (String deviceName)
Parametri | |
---|---|
deviceName |
String |
Ritorni | |
---|---|
ITestDevice |
getDeviceBuildMap
publicgetDeviceBuildMap ()
Ritorni | |
---|---|
|
getDeviceBySerial
public ITestDevice getDeviceBySerial (String serial)
Parametri | |
---|---|
serial |
String |
Ritorni | |
---|---|
ITestDevice |
getDeviceConfigNames
publicgetDeviceConfigNames ()
Ritorni | |
---|---|
|
getDeviceName
public String getDeviceName (ITestDevice device)
Parametri | |
---|---|
device |
ITestDevice |
Ritorni | |
---|---|
String |
getDispositivi
publicgetDevices ()
Ritorni | |
---|---|
|
getInvocationId
public String getInvocationId ()
Ritorni | |
---|---|
String |
getModuleInvocationContext
public IInvocationContext getModuleInvocationContext ()
Ritorni | |
---|---|
IInvocationContext |
getNumDevicesAllocati
public int getNumDevicesAllocated ()
Ritorni | |
---|---|
int |
getSerials
publicgetSerials ()
Ritorni | |
---|---|
|
getShardsSerials
publicgetShardsSerials ()
Ritorni | |
---|---|
|
getTestTag
public String getTestTag ()
Ritorni | |
---|---|
String |
LockAttributes
public void lockAttributes ()
Blocca il contesto per evitare l'aggiunta di altri attributi di chiamata.
logInvocationMetrics
public void logInvocationMetrics ()
Registra gli attributi InvocationMetricLogger
nella chiamata.
markReleasedEarly
public void markReleasedEarly ()
setConfigurationDescriptor
public void setConfigurationDescriptor (ConfigurationDescriptor configurationDescriptor)
Parametri | |
---|---|
configurationDescriptor |
ConfigurationDescriptor |
setModuleInvocationContext
public void setModuleInvocationContext (IInvocationContext invocationContext)
Parametri | |
---|---|
invocationContext |
IInvocationContext |
setRecoveryModePerTutti i dispositivi
public void setRecoveryModeForAllDevices (ITestDevice.RecoveryMode mode)
Parametri | |
---|---|
mode |
ITestDevice.RecoveryMode |
setTestTag
public void setTestTag (String testTag)
Parametri | |
---|---|
testTag |
String |
toProto
public InvocationContext.Context toProto ()
Ritorni | |
---|---|
InvocationContext.Context |
èstatoRilasciatoIn anticipo
public boolean wasReleasedEarly ()
Ritorni | |
---|---|
boolean |