ServerManajemenPerangkatGrpc

public class DeviceManagementGrpcServer
extends DeviceManagementGrpc.DeviceManagementImplBase

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


Server GRPC yang memungkinkan pencadangan perangkat dari Tradefed.

Ringkasan

Konstruktor publik

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

Metode publik

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

Menampilkan port yang digunakan oleh server.

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

Hentikan server GCP.

void start()

Mulai server GPC.

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

Konstruktor publik

ServerManajemenPerangkatGrpc

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

Parameter
port int

deviceManager IDeviceManager

scheduler ICommandScheduler

ServerManajemenPerangkatGrpc

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

Parameter
serverBuilder ServerBuilder

deviceManager IDeviceManager

scheduler ICommandScheduler

ServerManajemenPerangkatGrpc

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

Parameter
server Server

deviceManager IDeviceManager

scheduler ICommandScheduler

Metode publik

getDeviceFromReservasi

public ITestDevice getDeviceFromReservation (String reservationId)

Parameter
reservationId String

Hasil
ITestDevice

getDevicesStatus

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

Parameter
request GetDevicesStatusRequest

responseObserver StreamObserver

getPort

public static Integer getPort ()

Menampilkan port yang digunakan oleh server.

Hasil
Integer

rilisReservasi

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

Parameter
request ReleaseReservationRequest

responseObserver StreamObserver

cadanganPerangkat

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

Parameter
request ReserveDeviceRequest

responseObserver StreamObserver

matikan

public void shutdown ()

Hentikan server GCP.

start

public void start ()

Mulai server GPC.

stopLeasing

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

Parameter
request StopLeasingRequest

responseObserver StreamObserver