ClusterClient

public class ClusterClient
extends Object implements IClusterClient

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


Un'implementazione di IClusterClient per interagire con il backend del 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)

Determina lo stato di un comando del cluster.

ClusterCommandStatus getCommandStatus(String requestId, String commandId)

Visualizza lo stato di un comando del 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)

Ricevi TestEnvironment per una richiesta.

getTestResources(String requestId)

Ricevi TestResource per una richiesta.

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

Affitto ClusterCommand per l'host specificato.

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.

Ritorni
IClusterEventUploader<ClusterCommandEvent>

getCommandState

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

Determina lo stato di un comando del cluster.

Parametri
requestId String: ID richiesta del cluster

commandId String: ID comando cluster

Ritorni
ClusterCommand.State stato del comando cluster o ClusterCommand.State.UNKNOWN se non è stato possibile determinarlo

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

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

Parametri
requestId String: ID richiesta del cluster

commandId String: ID comando cluster

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

getHostEventUploader

public IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

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

Ritorni
IClusterEventUploader<ClusterHostEvent>

getTestContext

public TestContext getTestContext (String requestId, 
                String commandId)

Parametri
requestId String

commandId String

Ritorni
TestContext

Lanci
JSONException

getTestEnvironment

public TestEnvironment getTestEnvironment (String requestId)

Ricevi TestEnvironment per una richiesta.

Ritorni
TestEnvironment un oggetto TestEnvironment.

Lanci
JSONException

getTestResources

public  getTestResources (String requestId)

Ricevi TestResource per una richiesta.

Ritorni
un elenco di TestResource.

Lanci
JSONException

leaseHostCommands

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

Affitto ClusterCommand per l'host specificato.

Parametri
clusterId String: ID cluster per l'host

hostname String: nome host

deviceInfos : deviceInfos dell'organizzatore

nextClusterIds : un elenco di ID cluster successivi da cui acquisire i comandi.

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

Ritorni
un elenco di ClusterCommand

Lanci
JSONException

updateTestContext

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

Parametri
requestId String

commandId String

testContext TestContext

Lanci
JSONException