Tabnine Logo
GrpcCallContext.nullToSelf
Code IndexAdd Tabnine to your IDE (free)

How to use
nullToSelf
method
in
com.google.api.gax.grpc.GrpcCallContext

Best Java code snippets using com.google.api.gax.grpc.GrpcCallContext.nullToSelf (Showing top 7 results out of 315)

origin: com.google.api/gax-grpc

 private ApiCallContext contextWithParamsEncoder(RequestT request, ApiCallContext inputContext) {
  return GrpcCallContext.createDefault()
    .nullToSelf(inputContext)
    .withRequestParamsDynamicHeaderOption(paramsEncoder.encode(request));
 }
}
origin: com.google.api/gax-grpc

@Override
public ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext inputContext) {
 GrpcCallContext context = GrpcCallContext.createDefault().nullToSelf(inputContext);
 ApiFuture<ResponseT> innerCallFuture = callable.futureCall(request, context);
 ExceptionTransformingFuture transformingFuture =
   new ExceptionTransformingFuture(innerCallFuture);
 ApiFutures.addCallback(innerCallFuture, transformingFuture, directExecutor());
 return transformingFuture;
}
origin: googleapis/gax-java

@Override
public ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext inputContext) {
 GrpcCallContext context = GrpcCallContext.createDefault().nullToSelf(inputContext);
 ApiFuture<ResponseT> innerCallFuture = callable.futureCall(request, context);
 ExceptionTransformingFuture transformingFuture =
   new ExceptionTransformingFuture(innerCallFuture);
 ApiFutures.addCallback(innerCallFuture, transformingFuture, directExecutor());
 return transformingFuture;
}
origin: googleapis/gax-java

 private ApiCallContext contextWithParamsEncoder(RequestT request, ApiCallContext inputContext) {
  return GrpcCallContext.createDefault()
    .nullToSelf(inputContext)
    .withRequestParamsDynamicHeaderOption(paramsEncoder.encode(request));
 }
}
origin: com.google.api/gax-grpc

 @Override
 public ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext inputContext) {
  GrpcCallContext newCallContext =
    GrpcCallContext.createDefault()
      .nullToSelf(inputContext)
      .withRequestParamsDynamicHeaderOption(paramsEncoder.encode(request));

  return callable.futureCall(request, newCallContext);
 }
}
origin: googleapis/gax-java

 @Override
 public ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext inputContext) {
  GrpcCallContext newCallContext =
    GrpcCallContext.createDefault()
      .nullToSelf(inputContext)
      .withRequestParamsDynamicHeaderOption(paramsEncoder.encode(request));

  return callable.futureCall(request, newCallContext);
 }
}
origin: googleapis/gax-java

@Test
public void testNullToSelfWrongType() {
 thrown.expect(IllegalArgumentException.class);
 GrpcCallContext.createDefault().nullToSelf(FakeCallContext.createDefault());
}
com.google.api.gax.grpcGrpcCallContextnullToSelf

Javadoc

Returns inputContext cast to GrpcCallContext, or an empty GrpcCallContext if inputContext is null.

Popular methods of GrpcCallContext

  • createDefault
    Returns an empty instance with a null channel and default CallOptions.
  • getCallOptions
    The CallOptions set on this context.
  • getChannel
    The Channel set on this context.
  • getExtraHeaders
    The extra header for this context.
  • getTimeout
  • of
    Returns an instance with the given channel and CallOptions.
  • withCallOptions
    Returns a new instance with the call options set to the given call options.
  • withChannel
    Returns a new instance with the channel set to the given channel.
  • withChannelAffinity
  • withRequestParamsDynamicHeaderOption
  • <init>
  • getChannelAffinity
    The channel affinity for this context.
  • <init>,
  • getChannelAffinity,
  • getMetadata,
  • withExtraHeaders,
  • withStreamIdleTimeout,
  • withStreamWaitTimeout,
  • getStreamIdleTimeout,
  • getStreamWaitTimeout,
  • getTracer

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Notification (javax.management)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now