Управление устройствомGrpcServer

public class DeviceManagementGrpcServer
extends DeviceManagementGrpc.DeviceManagementImplBase

java.lang.Объект
com.proto.tradefed.device.DeviceManagementGrpc.DeviceManagementImplBase
com.android.tradefed.service.management.DeviceManagementGrpcServer


GRPC-сервер, позволяющий зарезервировать устройство у Tradefed.

Краткое содержание

Общественные конструкторы

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

Публичные методы

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

Возвращает порт, используемый сервером.

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

Остановите сервер grpc.

void start ()

Запустите сервер grpc.

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

Общественные конструкторы

Управление устройствомGrpcServer

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

Параметры
port int

deviceManager IDeviceManager

scheduler ICommandScheduler

Управление устройствомGrpcServer

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

Параметры
serverBuilder ServerBuilder

deviceManager IDeviceManager

scheduler ICommandScheduler

Управление устройствомGrpcServer

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

Параметры
server Server

deviceManager IDeviceManager

scheduler ICommandScheduler

Публичные методы

getDeviceFromReservation

public ITestDevice getDeviceFromReservation (String reservationId)

Параметры
reservationId String

Возврат
ITestDevice

getDevicesStatus

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

Параметры
request GetDevicesStatusRequest

responseObserver StreamObserver

getPort

public static Integer getPort ()

Возвращает порт, используемый сервером.

Возврат
Integer

релизРезервация

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

Параметры
request ReleaseReservationRequest

responseObserver StreamObserver

резервное устройство

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

Параметры
request ReserveDeviceRequest

responseObserver StreamObserver

неисправность

public void shutdown ()

Остановите сервер grpc.

начинать

public void start ()

Запустите сервер grpc.

стопЛизинг

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

Параметры
request StopLeasingRequest

responseObserver StreamObserver