Class 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>
      com.google.api.gax.rpc.UnaryCallable<RequestT,​ResponseT>
      createBaseUnaryCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings, com.google.api.gax.rpc.UnaryCallSettings<?,​?> callSettings, com.google.api.gax.rpc.ClientContext clientContext)
      Create a Unary callable object with minimal grpc-specific functionality.
      static <RequestT,​ResponseT>
      com.google.api.gax.rpc.UnaryCallable<RequestT,​ResponseT>
      createBatchingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings, com.google.api.gax.rpc.BatchingCallSettings<RequestT,​ResponseT> batchingCallSettings, com.google.api.gax.rpc.ClientContext clientContext)
      Create a callable object that represents a batching API method.
      static <RequestT,​ResponseT>
      com.google.api.gax.rpc.BidiStreamingCallable<RequestT,​ResponseT>
      createBidiStreamingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings, com.google.api.gax.rpc.StreamingCallSettings<RequestT,​ResponseT> streamingCallSettings, com.google.api.gax.rpc.ClientContext clientContext)
      Create a bidirectional streaming callable object with grpc-specific functionality.
      static <RequestT,​ResponseT>
      com.google.api.gax.rpc.ClientStreamingCallable<RequestT,​ResponseT>
      createClientStreamingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings, com.google.api.gax.rpc.StreamingCallSettings<RequestT,​ResponseT> streamingCallSettings, com.google.api.gax.rpc.ClientContext clientContext)
      Create a client-streaming callable object with grpc-specific functionality.
      static <RequestT,​ResponseT,​MetadataT>
      com.google.api.gax.rpc.OperationCallable<RequestT,​ResponseT,​MetadataT>
      createOperationCallable​(GrpcCallSettings<RequestT,​com.google.longrunning.Operation> grpcCallSettings, com.google.api.gax.rpc.OperationCallSettings<RequestT,​ResponseT,​MetadataT> operationCallSettings, com.google.api.gax.rpc.ClientContext clientContext, OperationsStub operationsStub)
      Creates a callable object that represents a long-running operation.
      static <RequestT,​ResponseT,​PagedListResponseT>
      com.google.api.gax.rpc.UnaryCallable<RequestT,​PagedListResponseT>
      createPagedCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings, com.google.api.gax.rpc.PagedCallSettings<RequestT,​ResponseT,​PagedListResponseT> pagedCallSettings, com.google.api.gax.rpc.ClientContext clientContext)
      Create a paged callable object that represents a paged API method.
      static <RequestT,​ResponseT>
      com.google.api.gax.rpc.ServerStreamingCallable<RequestT,​ResponseT>
      createServerStreamingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings, com.google.api.gax.rpc.ServerStreamingCallSettings<RequestT,​ResponseT> streamingCallSettings, com.google.api.gax.rpc.ClientContext clientContext)
      Create a server-streaming callable with grpc-specific functionality.
      static <RequestT,​ResponseT>
      com.google.api.gax.rpc.ServerStreamingCallable<RequestT,​ResponseT>
      createServerStreamingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings, com.google.api.gax.rpc.StreamingCallSettings<RequestT,​ResponseT> streamingCallSettings, com.google.api.gax.rpc.ClientContext clientContext)
      Deprecated.
      Please use ServerStreamingCallSettings
      static <RequestT,​ResponseT>
      com.google.api.gax.rpc.UnaryCallable<RequestT,​ResponseT>
      createUnaryCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings, com.google.api.gax.rpc.UnaryCallSettings<RequestT,​ResponseT> callSettings, com.google.api.gax.rpc.ClientContext clientContext)
      Create a callable object with grpc-specific functionality.
    • Method Detail

      • createBaseUnaryCallable

        public static <RequestT,​ResponseT> com.google.api.gax.rpc.UnaryCallable<RequestT,​ResponseT> createBaseUnaryCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings,
                                                                                                                                        com.google.api.gax.rpc.UnaryCallSettings<?,​?> callSettings,
                                                                                                                                        com.google.api.gax.rpc.ClientContext clientContext)
        Create a Unary callable object with minimal grpc-specific functionality.
        Parameters:
        grpcCallSettings - the gRPC call settings
        callSettings - the Unary call settings
        clientContext - ClientContext to use to connect to the service.
      • createUnaryCallable

        public static <RequestT,​ResponseT> com.google.api.gax.rpc.UnaryCallable<RequestT,​ResponseT> createUnaryCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings,
                                                                                                                                    com.google.api.gax.rpc.UnaryCallSettings<RequestT,​ResponseT> callSettings,
                                                                                                                                    com.google.api.gax.rpc.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> com.google.api.gax.rpc.UnaryCallable<RequestT,​PagedListResponseT> createPagedCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings,
                                                                                                                                                                      com.google.api.gax.rpc.PagedCallSettings<RequestT,​ResponseT,​PagedListResponseT> pagedCallSettings,
                                                                                                                                                                      com.google.api.gax.rpc.ClientContext clientContext)
        Create a paged callable object that represents a paged API method. Designed for use by generated code.
        Parameters:
        grpcCallSettings - the gRPC call settings
        pagedCallSettings - PagedCallSettings to configure the paged settings with.
        clientContext - ClientContext to use to connect to the service.
        Returns:
        UnaryCallable callable object.
      • createBatchingCallable

        public static <RequestT,​ResponseT> com.google.api.gax.rpc.UnaryCallable<RequestT,​ResponseT> createBatchingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings,
                                                                                                                                       com.google.api.gax.rpc.BatchingCallSettings<RequestT,​ResponseT> batchingCallSettings,
                                                                                                                                       com.google.api.gax.rpc.ClientContext clientContext)
        Create a callable object that represents a batching API method. Designed for use by generated code.
        Parameters:
        grpcCallSettings - the gRPC call settings
        batchingCallSettings - BatchingCallSettings to configure the batching related settings with.
        clientContext - ClientContext to use to connect to the service.
        Returns:
        UnaryCallable callable object.
      • createOperationCallable

        public static <RequestT,​ResponseT,​MetadataT> com.google.api.gax.rpc.OperationCallable<RequestT,​ResponseT,​MetadataT> createOperationCallable​(GrpcCallSettings<RequestT,​com.google.longrunning.Operation> grpcCallSettings,
                                                                                                                                                                            com.google.api.gax.rpc.OperationCallSettings<RequestT,​ResponseT,​MetadataT> operationCallSettings,
                                                                                                                                                                            com.google.api.gax.rpc.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 settings
        operationCallSettings - OperationCallSettings to configure the method-level settings with.
        clientContext - ClientContext to use to connect to the service.
        operationsStub - OperationsStub to use to poll for updates on the Operation.
        Returns:
        OperationCallable callable object.
      • createBidiStreamingCallable

        public static <RequestT,​ResponseT> com.google.api.gax.rpc.BidiStreamingCallable<RequestT,​ResponseT> createBidiStreamingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings,
                                                                                                                                                    com.google.api.gax.rpc.StreamingCallSettings<RequestT,​ResponseT> streamingCallSettings,
                                                                                                                                                    com.google.api.gax.rpc.ClientContext clientContext)
        Create a bidirectional streaming callable object with grpc-specific functionality. Designed for use by generated code.
        Parameters:
        grpcCallSettings - the gRPC call settings
        streamingCallSettings - StreamingCallSettings to configure the method-level settings with.
        clientContext - ClientContext to use to connect to the service.
        Returns:
        BidiStreamingCallable callable object.
      • createServerStreamingCallable

        @Deprecated
        public static <RequestT,​ResponseT> com.google.api.gax.rpc.ServerStreamingCallable<RequestT,​ResponseT> createServerStreamingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings,
                                                                                                                                                        com.google.api.gax.rpc.StreamingCallSettings<RequestT,​ResponseT> streamingCallSettings,
                                                                                                                                                        com.google.api.gax.rpc.ClientContext clientContext)
        Deprecated.
        Please use ServerStreamingCallSettings
        Create a server-streaming callable with grpc-specific functionality. Designed for use by generated code.
        Parameters:
        grpcCallSettings - the gRPC call settings
        streamingCallSettings - StreamingCallSettings to configure the method-level settings with.
        clientContext - ClientContext to use to connect to the service.
      • createServerStreamingCallable

        public static <RequestT,​ResponseT> com.google.api.gax.rpc.ServerStreamingCallable<RequestT,​ResponseT> createServerStreamingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings,
                                                                                                                                                        com.google.api.gax.rpc.ServerStreamingCallSettings<RequestT,​ResponseT> streamingCallSettings,
                                                                                                                                                        com.google.api.gax.rpc.ClientContext clientContext)
        Create a server-streaming callable with grpc-specific functionality. Designed for use by generated code.
        Parameters:
        grpcCallSettings - the gRPC call settings
        streamingCallSettings - StreamingCallSettings to configure the method-level settings with.
        clientContext - ClientContext to use to connect to the service.
      • createClientStreamingCallable

        public static <RequestT,​ResponseT> com.google.api.gax.rpc.ClientStreamingCallable<RequestT,​ResponseT> createClientStreamingCallable​(GrpcCallSettings<RequestT,​ResponseT> grpcCallSettings,
                                                                                                                                                        com.google.api.gax.rpc.StreamingCallSettings<RequestT,​ResponseT> streamingCallSettings,
                                                                                                                                                        com.google.api.gax.rpc.ClientContext clientContext)
        Create a client-streaming callable object with grpc-specific functionality. Designed for use by generated code.
        Parameters:
        grpcCallSettings - the gRPC call settings
        streamingCallSettings - StreamingCallSettings to configure the method-level settings with.
        clientContext - ClientContext to use to connect to the service.
        Returns:
        ClientStreamingCallable callable object.