DeviceManagementGrpcServer

public class DeviceManagementGrpcServer
extends DeviceManagementGrpc.DeviceManagementImplBase

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


Server GRPC che consente di prenotare un dispositivo da Tradefed.

Riepilogo

Costruttori pubblici

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

Metodi pubblici

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

Restituisce la porta utilizzata dal server.

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

Arresta il server GRpc.

void start()

Avvia il server GRPC.

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

Costruttori pubblici

DeviceManagementGrpcServer

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

Parametri
port int

deviceManager IDeviceManager

scheduler ICommandScheduler

DeviceManagementGrpcServer

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

Parametri
server Server

deviceManager IDeviceManager

scheduler ICommandScheduler

DeviceManagementGrpcServer

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

Parametri
serverBuilder ServerBuilder

deviceManager IDeviceManager

scheduler ICommandScheduler

Metodi pubblici

getDeviceFromReservation

public ITestDevice getDeviceFromReservation (String reservationId)

Parametri
reservationId String

Ritorni
ITestDevice

getDevicesStatus

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

Parametri
request GetDevicesStatusRequest

responseObserver StreamObserver

getPort

public static Integer getPort ()

Restituisce la porta utilizzata dal server.

Ritorni
Integer

releaseReservation

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

Parametri
request ReleaseReservationRequest

responseObserver StreamObserver

reserveDevice

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

Parametri
request ReserveDeviceRequest

responseObserver StreamObserver

arresto

public void shutdown ()

Arresta il server GRpc.

partenza

public void start ()

Avvia il server GRPC.

stopLeasing

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

Parametri
request StopLeasingRequest

responseObserver StreamObserver