ClusterClient

public class ClusterClient
extends Object implements IClusterClient

java.lang.Object
   ↳ com.android.tradefed.cluster.ClusterClient


Implementacja IClusterClient do interakcji z backendem TFC.

Podsumowanie

Konstruktory publiczne

ClusterClient()

Metody publiczne

IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader()

Uzyskaj IClusterEventUploader, którego możesz użyć do przesyłania ClusterCommandEvent.

ClusterCommand.State getCommandState(String requestId, String commandId)

Określ stan polecenia klastra.

ClusterCommandStatus getCommandStatus(String requestId, String commandId)

Pobierz stan polecenia klastra (stan i przyczynę anulowania, jeśli zostało anulowane).

IClusterEventUploader<ClusterHostEvent> getHostEventUploader()

Uzyskaj IClusterEventUploader, którego możesz użyć do przesyłania ClusterHostEvent.

TestContext getTestContext(String requestId, String commandId)

TestEnvironment getTestEnvironment(String requestId)

Uzyskaj TestEnvironment za prośbę.

List<TestResource> getTestResources(String requestId)

Uzyskaj TestResource dla prośby.

List<ClusterCommand> leaseHostCommands(String clusterId, String hostname, List<ClusterDeviceInfo> deviceInfos, List<String> nextClusterIds, int maxTasksTolease)

Dzierżawa ClusterCommand dla podanego hosta.

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

Konstruktory publiczne

ClusterClient

public ClusterClient ()

Metody publiczne

getCommandEventUploader

public IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

Uzyskaj IClusterEventUploader, którego możesz użyć do przesyłania ClusterCommandEvent.

Zwraca
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

Zwraca
ClusterCommand.State stan polecenia klastra lub ClusterCommand.State.UNKNOWN, jeśli nie udało się określić stanu.

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Pobierz stan polecenia klastra (stan i przyczynę anulowania, jeśli zostało anulowane).

Parametry
requestId String: identyfikator żądania klastra

commandId String: identyfikator polecenia klastra

Zwraca
ClusterCommandStatus obiekt ClusterCommandStatus, który reprezentuje stan i przyczynę anulowania, jeśli polecenie zostało anulowane. Jeśli nie udało się określić stanu, jest on ClusterCommand.State.UNKNOWN.

getHostEventUploader

public IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

Uzyskaj IClusterEventUploader, którego możesz użyć do przesyłania ClusterHostEvent.

Zwraca
IClusterEventUploader<ClusterHostEvent>

getTestContext

public TestContext getTestContext (String requestId, 
                String commandId)

Parametry
requestId String

commandId String

Zwraca
TestContext

Zgłasza
IOException
JSONException

getTestEnvironment

public TestEnvironment getTestEnvironment (String requestId)

Uzyskaj TestEnvironment za prośbę.

Zwraca
TestEnvironment obiekt TestEnvironment.

Zgłasza
IOException
JSONException

getTestResources

public List<TestResource> getTestResources (String requestId)

Uzyskaj TestResource dla prośby.

Zwraca
List<TestResource> listę TestResource.

Zgłasza
IOException
JSONException

leaseHostCommands

public List<ClusterCommand> leaseHostCommands (String clusterId, 
                String hostname, 
                List<ClusterDeviceInfo> deviceInfos, 
                List<String> nextClusterIds, 
                int maxTasksTolease)

Dzierżawa ClusterCommand dla podanego hosta.

Parametry
clusterId String: identyfikator klastra hosta.

hostname String: nazwa hosta

deviceInfos List: deviceInfos hosta

nextClusterIds List: lista identyfikatorów następnych klastrów, z których mają być pobierane polecenia.

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

Zwraca
List<ClusterCommand> listę ClusterCommand,

Zgłasza
JSONException

updateTestContext

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

Parametry
requestId String

commandId String

testContext TestContext

Zgłasza
IOException
JSONException