Klient klastra

public class ClusterClient
extends Object implements IClusterClient

java.lang.Obiekt
com.android.tradefed.cluster.ClusterClient


Implementacja IClusterClient do interakcji z zapleczem TFC.

Streszczenie

Konstruktory publiczne

ClusterClient ()

Metody publiczne

IClusterEventUploader < ClusterCommandEvent > getCommandEventUploader ()

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

ClusterCommand.State getCommandState (String requestId, String commandId)

Określ stan polecenia klastra.

ClusterCommandStatus getCommandStatus (String requestId, String commandId)

Uzyskaj stan polecenia klastra (stan i powód anulowania, jeśli został anulowany).

IClusterEventUploader < ClusterHostEvent > getHostEventUploader ()

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

TestContext getTestContext (String requestId, String commandId)

TestEnvironment getTestEnvironment (String requestId)

Pobierz TestEnvironment dla żądania.

getTestResources (String requestId)

Pobierz TestResource s dla żądania.

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)

Dzierżawi ClusterCommand dla podanego hosta.

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

Konstruktory publiczne

Klient klastra

public ClusterClient ()

Metody publiczne

getCommandEvent Uploader

public IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

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

Zwroty
IClusterEventUploader < ClusterCommandEvent >

getCommandState

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

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Uzyskaj stan polecenia klastra (stan i powód anulowania, jeśli został anulowany).

Parametry
requestId String : identyfikator żądania klastra

commandId String : identyfikator polecenia klastra

Zwroty
ClusterCommandStatus ClusterCommandStatus, który reprezentuje stan i przyczynę anulowania, jeśli polecenie zostało 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 ClusterHostEvent s.

Zwroty
IClusterEventUploader < ClusterHostEvent >

pobierzTestContext

public TestContext getTestContext (String requestId, 
                String commandId)

Parametry
requestId String

commandId String

Zwroty
TestContext

Rzuty
JSONException

pobierz środowisko testowe

public TestEnvironment getTestEnvironment (String requestId)

Pobierz TestEnvironment dla żądania.

Zwroty
TestEnvironment obiekt TestEnvironment .

Rzuty
JSONException

pobierz zasoby testowe

public  getTestResources (String requestId)

Pobierz TestResource s dla żądania.

Zwroty
lista TestResource .

Rzuty
JSONException

LeasingHostCommand

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

Dzierżawi ClusterCommand dla podanego hosta.

Parametry
clusterId String : identyfikator klastra dla hosta

hostname String : nazwa hosta

deviceInfos : informacje o urządzeniu hosta

nextClusterIds : lista następnych identyfikatorów klastrów, z których można dzierżawić polecenia.

maxTasksTolease int : maksymalna liczba zadań, które można obecnie wydzierżawić

Zwroty
lista ClusterCommand

Rzuty
JSONException

aktualizujTestContext

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

Parametry
requestId String

commandId String

testContext TestContext

Rzuty
JSONException