Klient klastra

public class ClusterClient
extends Object implements IClusterClient

Obiekt Java.lang.Object
com.android.tradefed.cluster.ClusterClient


Implementacja IClusterClient do interakcji z backendem TFC.

Streszczenie

Konstruktorzy publiczni

ClusterClient ()

Metody publiczne

IClusterEventUploader < ClusterCommandEvent > getCommandEventUploader ()

Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterCommandEvent .

ClusterCommand.State getCommandState (String requestId, String commandId)

Określ stan polecenia klastra.

ClusterCommandStatus getCommandStatus (String requestId, String commandId)

Uzyskaj status polecenia klastra (stan i przyczynę anulowania, jeśli anulowano).

IClusterEventUploader < ClusterHostEvent > getHostEventUploader ()

Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterHostEvent .

TestContext getTestContext (String requestId, String commandId)

TestEnvironment getTestEnvironment (String requestId)

Pobierz TestEnvironment na żądanie.

getTestResources (String requestId)

Pobierz TestResource s na żądanie.

leaseHostCommands (String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease)

Wydzierżawij polecenie ClusterCommand dla hosta przekazującego.

void updateTestContext (String requestId, String commandId, TestContext testContext)

Konstruktorzy publiczni

Klient klastra

public ClusterClient ()

Metody publiczne

getCommandEventUploader

public IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterCommandEvent .

Zwroty
IClusterEventUploader < ClusterCommandEvent >

pobierz stan polecenia

public ClusterCommand.State getCommandState (String requestId, 
                String commandId)

Określ stan polecenia klastra.

Parametry
requestId String : identyfikator żądania klastra

commandId String : identyfikator polecenia klastra

Zwroty
ClusterCommand.State stan polecenia klastra lub ClusterCommand.State#UNKNOWN , jeśli nie można określić stanu

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

Zwroty
ClusterCommandStatus ClusterCommandStatus, który reprezentuje stan i przyczynę anulowania, jeśli polecenie zostanie anulowane. Stan to ClusterCommand.State#UNKNOWN jeśli nie można go określić.

getHostEventUploader

public IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterHostEvent .

Zwroty
IClusterEventUploader < ClusterHostEvent >

pobierz kontekst testowy

public TestContext getTestContext (String requestId, 
                String commandId)

Parametry
requestId String

commandId String

Zwroty
TestContext

Rzuca
JSONException

pobierz środowisko testowe

public TestEnvironment getTestEnvironment (String requestId)

Pobierz TestEnvironment na żądanie.

Zwroty
TestEnvironment obiekt TestEnvironment .

Rzuca
JSONException

pobierz zasoby testowe

public  getTestResources (String requestId)

Pobierz TestResource s na żądanie.

Zwroty
lista TestResource .

Rzuca
JSONException

Polecenia leasingHost

public  leaseHostCommands (String clusterId, 
                String hostname, 
                 deviceInfos, 
                 nextClusterIds, 
                int maxTasksTolease)

Wydzierżawij polecenie ClusterCommand dla hosta przekazującego.

Parametry
clusterId String : identyfikator klastra dla hosta

hostname String : nazwa hosta

deviceInfos : 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ć

Zwroty
lista ClusterCommand

Rzuca
JSONException

aktualizacjaTestContext

public void updateTestContext (String requestId, 
                String commandId, 
                TestContext testContext)

Parametry
requestId String

commandId String

testContext TestContext

Rzuca
JSONException