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 do Tradefed.
Resumo
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
getDeviceFromReservation
public ITestDevice getDeviceFromReservation (String reservationId)
Parâmetros |
---|
reservationId | String |
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.
liberaçãoReserva
public void releaseReservation (ReleaseReservationRequest request,
StreamObserver<ReleaseReservationResponse> responseObserver)
Parâmetros |
---|
request | ReleaseReservationRequest |
responseObserver | StreamObserver |
reservaDispositivo
public void reserveDevice (ReserveDeviceRequest request,
StreamObserver<ReserveDeviceResponse> responseObserver)
Parâmetros |
---|
request | ReserveDeviceRequest |
responseObserver | StreamObserver |
desligar
public void shutdown ()
Pare o servidor grpc.
começar
public void start ()
Inicie o servidor grpc.
parar de leasing
public void stopLeasing (StopLeasingRequest request,
StreamObserver<StopLeasingResponse> responseObserver)
Parâmetros |
---|
request | StopLeasingRequest |
responseObserver | StreamObserver |