Package com.google.api.gax.grpc
Class GrpcCallableFactory
- java.lang.Object
-
- com.google.api.gax.grpc.GrpcCallableFactory
-
public class GrpcCallableFactory extends Object
Class with utility methods to create grpc-based direct callables.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <RequestT,ResponseT>
UnaryCallable<RequestT,ResponseT>createBaseUnaryCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, UnaryCallSettings<?,?> callSettings, ClientContext clientContext)Create a Unary callable object with minimal grpc-specific functionality.static <RequestT,ResponseT>
UnaryCallable<RequestT,ResponseT>createBatchingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, BatchingCallSettings<RequestT,ResponseT> batchingCallSettings, ClientContext clientContext)Create a callable object that represents a batching API method.static <RequestT,ResponseT>
BidiStreamingCallable<RequestT,ResponseT>createBidiStreamingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, StreamingCallSettings<RequestT,ResponseT> streamingCallSettings, ClientContext clientContext)Create a bidirectional streaming callable object with grpc-specific functionality.static <RequestT,ResponseT>
ClientStreamingCallable<RequestT,ResponseT>createClientStreamingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, StreamingCallSettings<RequestT,ResponseT> streamingCallSettings, ClientContext clientContext)Create a client-streaming callable object with grpc-specific functionality.static <RequestT,ResponseT,MetadataT>
OperationCallable<RequestT,ResponseT,MetadataT>createOperationCallable(GrpcCallSettings<RequestT,Operation> grpcCallSettings, OperationCallSettings<RequestT,ResponseT,MetadataT> operationCallSettings, ClientContext clientContext, OperationsStub operationsStub)Creates a callable object that represents a long-running operation.static <RequestT,ResponseT,PagedListResponseT>
UnaryCallable<RequestT,PagedListResponseT>createPagedCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, PagedCallSettings<RequestT,ResponseT,PagedListResponseT> pagedCallSettings, ClientContext clientContext)Create a paged callable object that represents a paged API method.static <RequestT,ResponseT>
ServerStreamingCallable<RequestT,ResponseT>createServerStreamingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, ServerStreamingCallSettings<RequestT,ResponseT> streamingCallSettings, ClientContext clientContext)Create a server-streaming callable with grpc-specific functionality.static <RequestT,ResponseT>
ServerStreamingCallable<RequestT,ResponseT>createServerStreamingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, StreamingCallSettings<RequestT,ResponseT> streamingCallSettings, ClientContext clientContext)Deprecated.Please use ServerStreamingCallSettingsstatic <RequestT,ResponseT>
UnaryCallable<RequestT,ResponseT>createUnaryCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, UnaryCallSettings<RequestT,ResponseT> callSettings, ClientContext clientContext)Create a callable object with grpc-specific functionality.
-
-
-
Method Detail
-
createBaseUnaryCallable
public static <RequestT,ResponseT> UnaryCallable<RequestT,ResponseT> createBaseUnaryCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, UnaryCallSettings<?,?> callSettings, ClientContext clientContext)
Create a Unary callable object with minimal grpc-specific functionality.- Parameters:
grpcCallSettings- the gRPC call settingscallSettings- the Unary call settingsclientContext-ClientContextto use to connect to the service.
-
createUnaryCallable
public static <RequestT,ResponseT> UnaryCallable<RequestT,ResponseT> createUnaryCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, UnaryCallSettings<RequestT,ResponseT> callSettings, ClientContext clientContext)
Create a callable object with grpc-specific functionality. Designed for use by generated code.- Parameters:
grpcCallSettings- the gRPC call settings
-
createPagedCallable
public static <RequestT,ResponseT,PagedListResponseT> UnaryCallable<RequestT,PagedListResponseT> createPagedCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, PagedCallSettings<RequestT,ResponseT,PagedListResponseT> pagedCallSettings, ClientContext clientContext)
Create a paged callable object that represents a paged API method. Designed for use by generated code.- Parameters:
grpcCallSettings- the gRPC call settingspagedCallSettings-PagedCallSettingsto configure the paged settings with.clientContext-ClientContextto use to connect to the service.- Returns:
UnaryCallablecallable object.
-
createBatchingCallable
public static <RequestT,ResponseT> UnaryCallable<RequestT,ResponseT> createBatchingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, BatchingCallSettings<RequestT,ResponseT> batchingCallSettings, ClientContext clientContext)
Create a callable object that represents a batching API method. Designed for use by generated code.- Parameters:
grpcCallSettings- the gRPC call settingsbatchingCallSettings-BatchingCallSettingsto configure the batching related settings with.clientContext-ClientContextto use to connect to the service.- Returns:
UnaryCallablecallable object.
-
createOperationCallable
public static <RequestT,ResponseT,MetadataT> OperationCallable<RequestT,ResponseT,MetadataT> createOperationCallable(GrpcCallSettings<RequestT,Operation> grpcCallSettings, OperationCallSettings<RequestT,ResponseT,MetadataT> operationCallSettings, ClientContext clientContext, OperationsStub operationsStub)
Creates a callable object that represents a long-running operation. Designed for use by generated code.- Parameters:
grpcCallSettings- the gRPC call settingsoperationCallSettings-OperationCallSettingsto configure the method-level settings with.clientContext-ClientContextto use to connect to the service.operationsStub-OperationsStubto use to poll for updates on the Operation.- Returns:
OperationCallablecallable object.
-
createBidiStreamingCallable
public static <RequestT,ResponseT> BidiStreamingCallable<RequestT,ResponseT> createBidiStreamingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, StreamingCallSettings<RequestT,ResponseT> streamingCallSettings, ClientContext clientContext)
Create a bidirectional streaming callable object with grpc-specific functionality. Designed for use by generated code.- Parameters:
grpcCallSettings- the gRPC call settingsstreamingCallSettings-StreamingCallSettingsto configure the method-level settings with.clientContext-ClientContextto use to connect to the service.- Returns:
BidiStreamingCallablecallable object.
-
createServerStreamingCallable
@Deprecated public static <RequestT,ResponseT> ServerStreamingCallable<RequestT,ResponseT> createServerStreamingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, StreamingCallSettings<RequestT,ResponseT> streamingCallSettings, ClientContext clientContext)
Deprecated.Please use ServerStreamingCallSettingsCreate a server-streaming callable with grpc-specific functionality. Designed for use by generated code.- Parameters:
grpcCallSettings- the gRPC call settingsstreamingCallSettings-StreamingCallSettingsto configure the method-level settings with.clientContext-ClientContextto use to connect to the service.
-
createServerStreamingCallable
public static <RequestT,ResponseT> ServerStreamingCallable<RequestT,ResponseT> createServerStreamingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, ServerStreamingCallSettings<RequestT,ResponseT> streamingCallSettings, ClientContext clientContext)
Create a server-streaming callable with grpc-specific functionality. Designed for use by generated code.- Parameters:
grpcCallSettings- the gRPC call settingsstreamingCallSettings-StreamingCallSettingsto configure the method-level settings with.clientContext-ClientContextto use to connect to the service.
-
createClientStreamingCallable
public static <RequestT,ResponseT> ClientStreamingCallable<RequestT,ResponseT> createClientStreamingCallable(GrpcCallSettings<RequestT,ResponseT> grpcCallSettings, StreamingCallSettings<RequestT,ResponseT> streamingCallSettings, ClientContext clientContext)
Create a client-streaming callable object with grpc-specific functionality. Designed for use by generated code.- Parameters:
grpcCallSettings- the gRPC call settingsstreamingCallSettings-StreamingCallSettingsto configure the method-level settings with.clientContext-ClientContextto use to connect to the service.- Returns:
ClientStreamingCallablecallable object.
-
-