Klient ICluster
public interface IClusterClient
com.android.tradefed.cluster.IClusterClient |
Interfejs do interakcji z backendem TFC.
Streszczenie
Stałe |
---|
String | TYPE_NAME Unikalna nazwa typu obiektu konfiguracyjnego. |
Metody publiczne |
---|
abstract IClusterEventUploader < ClusterCommandEvent > | getCommandEventUploader () Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterCommandEvent . |
abstract ClusterCommand.State | getCommandState (String requestId, String commandId) Określ stan polecenia klastra. |
default ClusterCommandStatus | getCommandStatus (String requestId, String commandId) Uzyskaj status polecenia klastra (stan i przyczynę anulowania, jeśli anulowano). |
abstract IClusterEventUploader < ClusterHostEvent > | getHostEventUploader () Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterHostEvent . |
abstract TestContext | getTestContext (String requestId, String commandId) |
abstract TestEnvironment | getTestEnvironment (String requestId) Pobierz TestEnvironment na żądanie. |
abstract | getTestResources (String requestId) Pobierz TestResource s na żądanie. |
abstract | leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) Wydzierżawij polecenie ClusterCommand dla hosta przekazującego. |
abstract void | updateTestContext (String requestId, String commandId, TestContext testContext) |
Stałe
WPISZ IMIĘ
public static final String TYPE_NAME
Unikalna nazwa typu obiektu konfiguracyjnego. Służy do pobierania instancji singletonu z GlobalConfiguration
.
Stała wartość: „cluster_client”
Metody publiczne
pobierz stan polecenia
public abstract ClusterCommand.State getCommandState (String requestId,
String commandId)
Określ stan polecenia klastra.
Parametry |
---|
requestId | String : identyfikator żądania klastra |
commandId | String : identyfikator polecenia klastra |
pobierzStatusPolecenia
public ClusterCommandStatus getCommandStatus (String requestId,
String commandId)
Uzyskaj status polecenia klastra (stan i przyczynę anulowania, jeśli anulowano).
Parametry |
---|
requestId | String : identyfikator żądania klastra |
commandId | String : identyfikator polecenia klastra |
pobierz kontekst testowy
public abstract TestContext getTestContext (String requestId,
String commandId)
Parametry |
---|
requestId | String |
commandId | String |
pobierz środowisko testowe
public abstract TestEnvironment getTestEnvironment (String requestId)
Pobierz TestEnvironment
na żądanie.
Rzuca |
---|
| Wyjątek IO |
| org.json.JSONException |
JSONException | |
pobierz zasoby testowe
public abstract getTestResources (String requestId)
Pobierz TestResource
s na żądanie.
Rzuca |
---|
| Wyjątek IO |
| org.json.JSONException |
JSONException | |
Polecenia leasingHost
public abstract leaseHostCommands (String clusterId,
String hostname,
devices,
nextClusterIds,
int maxTasksTolease)
Wydzierżawij polecenie ClusterCommand
dla hosta przekazującego.
Parametry |
---|
clusterId | String : identyfikator klastra dla hosta |
hostname | String : nazwa hosta |
devices | : informacje o urządzeniu, które posiada host |
nextClusterIds | : lista kolejnych identyfikatorów klastrów, z których można dzierżawić polecenia. |
maxTasksTolease | int : maksymalna liczba zadań, które można aktualnie dzierżawić |
Rzuca |
---|
| org.json.JSONException |
JSONException | |
aktualizacjaTestContext
public abstract void updateTestContext (String requestId,
String commandId,
TestContext testContext)
Parametry |
---|
requestId | String |
commandId | String |
testContext | TestContext |