Class DirectAccessServiceGrpc.DirectAccessServiceStub (0.2.0)

public static final class DirectAccessServiceGrpc.DirectAccessServiceStub extends AbstractAsyncStub<DirectAccessServiceGrpc.DirectAccessServiceStub>

A stub to allow clients to do asynchronous rpc calls to service DirectAccessService.

A service for allocating Android devices and interacting with the live-allocated devices. Each Session will wait for available capacity, at a higher priority over Test Execution. When allocated, the session will be exposed through a stream for integration. DirectAccessService is currently available as a preview to select developers. You can register today on behalf of you and your team at https://developer.android.com/studio/preview/android-device-streaming

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractAsyncStub > DirectAccessServiceGrpc.DirectAccessServiceStub

Methods

adbConnect(StreamObserver<DeviceMessage> responseObserver)

public StreamObserver<AdbMessage> adbConnect(StreamObserver<DeviceMessage> responseObserver)

Exposes an ADB connection if the device supports ADB. gRPC headers are used to authenticate the Connect RPC, as well as associate to a particular DeviceSession. In particular, the user must specify the "X-Omnilab-Session-Name" header.

Parameter
Name Description
responseObserver io.grpc.stub.StreamObserver<DeviceMessage>
Returns
Type Description
io.grpc.stub.StreamObserver<AdbMessage>

build(Channel channel, CallOptions callOptions)

protected DirectAccessServiceGrpc.DirectAccessServiceStub build(Channel channel, CallOptions callOptions)
Parameters
Name Description
channel io.grpc.Channel
callOptions io.grpc.CallOptions
Returns
Type Description
DirectAccessServiceGrpc.DirectAccessServiceStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

cancelDeviceSession(CancelDeviceSessionRequest request, StreamObserver<Empty> responseObserver)

public void cancelDeviceSession(CancelDeviceSessionRequest request, StreamObserver<Empty> responseObserver)

Cancel a DeviceSession. This RPC changes the DeviceSession to state FINISHED and terminates all connections. Canceled sessions are not deleted and can be retrieved or listed by the user until they expire based on the 28 day deletion policy.

Parameters
Name Description
request CancelDeviceSessionRequest
responseObserver io.grpc.stub.StreamObserver<Empty>

createDeviceSession(CreateDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

public void createDeviceSession(CreateDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

Creates a DeviceSession.

Parameters
Name Description
request CreateDeviceSessionRequest
responseObserver io.grpc.stub.StreamObserver<DeviceSession>

getDeviceSession(GetDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

public void getDeviceSession(GetDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

Gets a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.

Parameters
Name Description
request GetDeviceSessionRequest
responseObserver io.grpc.stub.StreamObserver<DeviceSession>

listDeviceSessions(ListDeviceSessionsRequest request, StreamObserver<ListDeviceSessionsResponse> responseObserver)

public void listDeviceSessions(ListDeviceSessionsRequest request, StreamObserver<ListDeviceSessionsResponse> responseObserver)

Lists DeviceSessions owned by the project user.

Parameters
Name Description
request ListDeviceSessionsRequest
responseObserver io.grpc.stub.StreamObserver<ListDeviceSessionsResponse>

updateDeviceSession(UpdateDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

public void updateDeviceSession(UpdateDeviceSessionRequest request, StreamObserver<DeviceSession> responseObserver)

Updates the current DeviceSession to the fields described by the update_mask.

Parameters
Name Description
request UpdateDeviceSessionRequest
responseObserver io.grpc.stub.StreamObserver<DeviceSession>