Gestión de dispositivosGrpcServer

public class DeviceManagementGrpcServer
extends DeviceManagementGrpc.DeviceManagementImplBase

java.lang.Objeto
com.proto.tradefed.device.DeviceManagementGrpc.DeviceManagementImplBase
com.android.tradefed.service.management.DeviceManagementGrpcServer


Servidor GRPC que permite reservar un dispositivo de Tradefed.

Resumen

Constructores públicos

DeviceManagementGrpcServer (int port, IDeviceManager deviceManager, ICommandScheduler scheduler)
DeviceManagementGrpcServer (ServerBuilder<?> serverBuilder, IDeviceManager deviceManager, ICommandScheduler scheduler)
DeviceManagementGrpcServer (Server server, IDeviceManager deviceManager, ICommandScheduler scheduler)

Métodos públicos

ITestDevice getDeviceFromReservation (String reservationId)
void getDevicesStatus (GetDevicesStatusRequest request, StreamObserver<GetDevicesStatusResponse> responseObserver)
static Integer getPort ()

Devuelve el puerto utilizado por el servidor.

void releaseReservation (ReleaseReservationRequest request, StreamObserver<ReleaseReservationResponse> responseObserver)
void reserveDevice (ReserveDeviceRequest request, StreamObserver<ReserveDeviceResponse> responseObserver)
void shutdown ()

Detenga el servidor grpc.

void start ()

Inicie el servidor grpc.

void stopLeasing (StopLeasingRequest request, StreamObserver<StopLeasingResponse> responseObserver)

Constructores públicos

Gestión de dispositivosGrpcServer

public DeviceManagementGrpcServer (int port, 
                IDeviceManager deviceManager, 
                ICommandScheduler scheduler)

Parámetros
port int

deviceManager IDeviceManager

scheduler ICommandScheduler

Gestión de dispositivosGrpcServer

public DeviceManagementGrpcServer (ServerBuilder<?> serverBuilder, 
                IDeviceManager deviceManager, 
                ICommandScheduler scheduler)

Parámetros
serverBuilder ServerBuilder

deviceManager IDeviceManager

scheduler ICommandScheduler

Gestión de dispositivosGrpcServer

public DeviceManagementGrpcServer (Server server, 
                IDeviceManager deviceManager, 
                ICommandScheduler scheduler)

Parámetros
server Server

deviceManager IDeviceManager

scheduler ICommandScheduler

Métodos públicos

getDeviceFromReservation

public ITestDevice getDeviceFromReservation (String reservationId)

Parámetros
reservationId String

Devoluciones
ITestDevice

obtener estado de dispositivos

public void getDevicesStatus (GetDevicesStatusRequest request, 
                StreamObserver<GetDevicesStatusResponse> responseObserver)

Parámetros
request GetDevicesStatusRequest

responseObserver StreamObserver

obtener puerto

public static Integer getPort ()

Devuelve el puerto utilizado por el servidor.

Devoluciones
Integer

lanzamientoReserva

public void releaseReservation (ReleaseReservationRequest request, 
                StreamObserver<ReleaseReservationResponse> responseObserver)

Parámetros
request ReleaseReservationRequest

responseObserver StreamObserver

reservardispositivo

public void reserveDevice (ReserveDeviceRequest request, 
                StreamObserver<ReserveDeviceResponse> responseObserver)

Parámetros
request ReserveDeviceRequest

responseObserver StreamObserver

cerrar

public void shutdown ()

Detenga el servidor grpc.

comenzar

public void start ()

Inicie el servidor grpc.

detener el arrendamiento

public void stopLeasing (StopLeasingRequest request, 
                StreamObserver<StopLeasingResponse> responseObserver)

Parámetros
request StopLeasingRequest

responseObserver StreamObserver