ClusterClient

public class ClusterClient
extends Object implements IClusterClient

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


Un'implementazione IClusterClient per interagire con il backend TFC.

Riepilogo

Costruttori pubblici

ClusterClient ()

Metodi pubblici

IClusterEventUploader < ClusterCommandEvent > getCommandEventUploader ()

Ottieni un IClusterEventUploader che può essere utilizzato per caricare ClusterCommandEvent .

ClusterCommand.State getCommandState (String requestId, String commandId)

Determinare lo stato di un comando cluster.

ClusterCommandStatus getCommandStatus (String requestId, String commandId)

Ottieni lo stato del comando di un comando cluster (lo stato e il motivo dell'annullamento se annullato).

IClusterEventUploader < ClusterHostEvent > getHostEventUploader ()

Ottieni un IClusterEventUploader che può essere utilizzato per caricare ClusterHostEvent .

TestContext getTestContext (String requestId, String commandId)

TestEnvironment getTestEnvironment (String requestId)

Ottieni TestEnvironment per una richiesta.

getTestResources (String requestId)

Ottieni TestResource per una richiesta.

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)

Lease ClusterCommand per l'host donato.

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

Costruttori pubblici

ClusterClient

public ClusterClient ()

Metodi pubblici

getCommandEventUploader

public IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

Ottieni un IClusterEventUploader che può essere utilizzato per caricare ClusterCommandEvent .

ritorna
IClusterEventUploader < ClusterCommandEvent >

getCommandState

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

Determinare lo stato di un comando cluster.

Parametri
requestId String : ID richiesta cluster

commandId String : ID comando cluster

ritorna
ClusterCommand.State lo stato del comando cluster o ClusterCommand.State#UNKNOWN se non è stato possibile determinare lo stato

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Ottieni lo stato del comando di un comando cluster (lo stato e il motivo dell'annullamento se annullato).

Parametri
requestId String : ID richiesta cluster

commandId String : ID comando cluster

ritorna
ClusterCommandStatus un ClusterCommandStatus che rappresenta lo stato e il motivo dell'annullamento se il comando viene annullato. Se non è stato possibile determinarlo, lo stato è ClusterCommand.State#UNKNOWN .

getHostEventUploader

public IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

Ottieni un IClusterEventUploader che può essere utilizzato per caricare ClusterHostEvent .

ritorna
IClusterEventUploader < ClusterHostEvent >

getTestContext

public TestContext getTestContext (String requestId, 
                String commandId)

Parametri
requestId String

commandId String

ritorna
TestContext

Lancia
JSONException

getTestEnvironment

public TestEnvironment getTestEnvironment (String requestId)

Ottieni TestEnvironment per una richiesta.

ritorna
TestEnvironment un oggetto TestEnvironment .

Lancia
JSONException

getTestResources

public  getTestResources (String requestId)

Ottieni TestResource per una richiesta.

ritorna
un elenco di TestResource .

Lancia
JSONException

leaseHostCommands

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

Lease ClusterCommand per l'host donato.

Parametri
clusterId String : ID cluster per l'host

hostname String : nome host

deviceInfos : informazioni sul dispositivo di cui dispone l'host

nextClusterIds : un elenco dei successivi ID cluster da cui noleggiare i comandi.

maxTasksTolease int : il numero massimo di attività che possono essere attualmente affittate

ritorna
un elenco di ClusterCommand

Lancia
JSONException

updateTestContext

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

Parametri
requestId String

commandId String

testContext TestContext

Lancia
JSONException