Device Streaming v1 API - Class DirectAccessService.DirectAccessServiceBase (1.0.0-beta01)

[BindServiceMethod(typeof(DirectAccessService), "BindService")]
public abstract class DirectAccessService.DirectAccessServiceBase

Reference documentation and code samples for the Device Streaming v1 API class DirectAccessService.DirectAccessServiceBase.

Base class for server-side implementations of DirectAccessService

Inheritance

object > DirectAccessService.DirectAccessServiceBase

Namespace

Google.Cloud.DeviceStreaming.V1

Assembly

Google.Cloud.DeviceStreaming.V1.dll

Methods

AdbConnect(IAsyncStreamReader<AdbMessage>, IServerStreamWriter<DeviceMessage>, ServerCallContext)

public virtual Task AdbConnect(IAsyncStreamReader<AdbMessage> requestStream, IServerStreamWriter<DeviceMessage> responseStream, ServerCallContext context)

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.

Parameters
Name Description
requestStream IAsyncStreamReaderAdbMessage

Used for reading requests from the client.

responseStream IServerStreamWriterDeviceMessage

Used for sending responses back to the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
Task

A task indicating completion of the handler.

CancelDeviceSession(CancelDeviceSessionRequest, ServerCallContext)

public virtual Task<Empty> CancelDeviceSession(CancelDeviceSessionRequest request, ServerCallContext context)

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

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskEmpty

The response to send back to the client (wrapped by a task).

CreateDeviceSession(CreateDeviceSessionRequest, ServerCallContext)

public virtual Task<DeviceSession> CreateDeviceSession(CreateDeviceSessionRequest request, ServerCallContext context)

Creates a DeviceSession.

Parameters
Name Description
request CreateDeviceSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskDeviceSession

The response to send back to the client (wrapped by a task).

GetDeviceSession(GetDeviceSessionRequest, ServerCallContext)

public virtual Task<DeviceSession> GetDeviceSession(GetDeviceSessionRequest request, ServerCallContext context)

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

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskDeviceSession

The response to send back to the client (wrapped by a task).

ListDeviceSessions(ListDeviceSessionsRequest, ServerCallContext)

public virtual Task<ListDeviceSessionsResponse> ListDeviceSessions(ListDeviceSessionsRequest request, ServerCallContext context)

Lists DeviceSessions owned by the project user.

Parameters
Name Description
request ListDeviceSessionsRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskListDeviceSessionsResponse

The response to send back to the client (wrapped by a task).

UpdateDeviceSession(UpdateDeviceSessionRequest, ServerCallContext)

public virtual Task<DeviceSession> UpdateDeviceSession(UpdateDeviceSessionRequest request, ServerCallContext context)

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

Parameters
Name Description
request UpdateDeviceSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskDeviceSession

The response to send back to the client (wrapped by a task).