ClusterClient

public class ClusterClient
extends Object implements IClusterClient

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


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

Ottieni lo stato del comando 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)

Ottieni TestEnvironment per una richiesta.

List<TestResource> getTestResources(String requestId)

Visualizza i TestResource per una richiesta.

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

Lease 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.

Resi
IClusterEventUploader<ClusterCommandEvent>

getCommandState

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

Determina lo stato di un comando del cluster.

Parametri
requestId String: ID richiesta cluster

commandId String: ID comando cluster

Resi
ClusterCommand.State stato del comando del 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 del cluster (lo stato e il motivo dell'annullamento, se annullato).

Parametri
requestId String: ID richiesta cluster

commandId String: ID comando cluster

Resi
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.

Resi
IClusterEventUploader<ClusterHostEvent>

getTestContext

public TestContext getTestContext (String requestId, 
                String commandId)

Parametri
requestId String

commandId String

Resi
TestContext

Genera
IOException
JSONException

getTestEnvironment

public TestEnvironment getTestEnvironment (String requestId)

Ottieni TestEnvironment per una richiesta.

Resi
TestEnvironment un oggetto TestEnvironment.

Genera
IOException
JSONException

getTestResources

public List<TestResource> getTestResources (String requestId)

Visualizza i TestResource per una richiesta.

Resi
List<TestResource> un elenco di TestResource.

Genera
IOException
JSONException

leaseHostCommands

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

Lease ClusterCommand per l'host specificato.

Parametri
clusterId String: l'ID cluster dell'host

hostname String: nome host

deviceInfos List: deviceInfos the host has

nextClusterIds List: un elenco degli ID dei cluster successivi da cui acquisire i comandi.

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

Resi
List<ClusterCommand> un elenco di ClusterCommand

Genera
JSONException

updateTestContext

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

Parametri
requestId String

commandId String

testContext TestContext

Genera
IOException
JSONException