DeviceManagementGrpcServer
public
class
DeviceManagementGrpcServer
extends DeviceManagementGrpc.DeviceManagementImplBase
java.lang.Object
|
↳ |
com.proto.tradefed.device.DeviceManagementGrpc.DeviceManagementImplBase
|
|
↳ |
com.android.tradefed.service.management.DeviceManagementGrpcServer
|
Máy chủ GRPC cho phép đặt trước thiết bị từ Tradefeed.
Tóm tắt
Phương thức công khai |
ITestDevice
|
getDeviceFromReservation(String reservationId)
|
void
|
getDevicesStatus(GetDevicesStatusRequest request, StreamObserver<GetDevicesStatusResponse> responseObserver)
|
static
Integer
|
getPort()
Trả về cổng mà máy chủ sử dụng.
|
void
|
releaseReservation(ReleaseReservationRequest request, StreamObserver<ReleaseReservationResponse> responseObserver)
|
void
|
reserveDevice(ReserveDeviceRequest request, StreamObserver<ReserveDeviceResponse> responseObserver)
|
void
|
shutdown()
Dừng máy chủ grpc.
|
void
|
start()
Khởi động máy chủ grpc.
|
void
|
stopLeasing(StopLeasingRequest request, StreamObserver<StopLeasingResponse> responseObserver)
|
Hàm khởi tạo công khai
DeviceManagementGrpcServer
public DeviceManagementGrpcServer (int port,
IDeviceManager deviceManager,
ICommandScheduler scheduler)
Tham số |
port |
int |
deviceManager |
IDeviceManager |
scheduler |
ICommandScheduler |
DeviceManagementGrpcServer
public DeviceManagementGrpcServer (Server server,
IDeviceManager deviceManager,
ICommandScheduler scheduler)
Tham số |
server |
Server |
deviceManager |
IDeviceManager |
scheduler |
ICommandScheduler |
DeviceManagementGrpcServer
public DeviceManagementGrpcServer (ServerBuilder<?> serverBuilder,
IDeviceManager deviceManager,
ICommandScheduler scheduler)
Tham số |
serverBuilder |
ServerBuilder |
deviceManager |
IDeviceManager |
scheduler |
ICommandScheduler |
Phương thức công khai
nhận thiết bịTừĐặt trước
public ITestDevice getDeviceFromReservation (String reservationId)
Tham số |
reservationId |
String |
nhận trạng thái thiết bị
public void getDevicesStatus (GetDevicesStatusRequest request,
StreamObserver<GetDevicesStatusResponse> responseObserver)
Tham số |
request |
GetDevicesStatusRequest |
responseObserver |
StreamObserver |
getPort
public static Integer getPort ()
Trả về cổng mà máy chủ sử dụng.
releaseReservation
public void releaseReservation (ReleaseReservationRequest request,
StreamObserver<ReleaseReservationResponse> responseObserver)
Tham số |
request |
ReleaseReservationRequest |
responseObserver |
StreamObserver |
reserveDevice
public void reserveDevice (ReserveDeviceRequest request,
StreamObserver<ReserveDeviceResponse> responseObserver)
Tham số |
request |
ReserveDeviceRequest |
responseObserver |
StreamObserver |
tắt
public void shutdown ()
Dừng máy chủ grpc.
start
public void start ()
Khởi động máy chủ grpc.
stopLeasing
public void stopLeasing (StopLeasingRequest request,
StreamObserver<StopLeasingResponse> responseObserver)
Tham số |
request |
StopLeasingRequest |
responseObserver |
StreamObserver |