DeviceManagementGrpcServer

public class DeviceManagementGrpcServer
extends DeviceManagementGrpc.DeviceManagementImplBase

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


Servidor GRPC que permite reservar um dispositivo da Tradefed.

Resumo

Construtores 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()

Retorna a porta usada pelo servidor.

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

Pare o servidor grpc.

void start()

Inicie o servidor grpc.

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

Construtores públicos

DeviceManagementGrpcServer

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

Parâmetros
port int

deviceManager IDeviceManager

scheduler ICommandScheduler

DeviceManagementGrpcServer

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

Parâmetros
serverBuilder ServerBuilder

deviceManager IDeviceManager

scheduler ICommandScheduler

DeviceManagementGrpcServer

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

Parâmetros
server Server

deviceManager IDeviceManager

scheduler ICommandScheduler

Métodos públicos

getDeviceFromReserva

public ITestDevice getDeviceFromReservation (String reservationId)

Parâmetros
reservationId String

Retorna
ITestDevice

getDevicesStatus

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

Parâmetros
request GetDevicesStatusRequest

responseObserver StreamObserver

getPort

public static Integer getPort ()

Retorna a porta usada pelo servidor.

Retorna
Integer

liberaReserva

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

Parâmetros
request ReleaseReservationRequest

responseObserver StreamObserver

reserveDevice

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

Parâmetros
request ReserveDeviceRequest

responseObserver StreamObserver

encerramento

public void shutdown ()

Pare o servidor grpc.

start

public void start ()

Inicie o servidor grpc.

stopLeasing

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

Parâmetros
request StopLeasingRequest

responseObserver StreamObserver