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

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

Best Java code snippets using com.google.api.gax.grpc.GrpcCallContext.withRequestParamsDynamicHeaderOption (Showing top 5 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: 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 testWithRequestParamsDynamicHeaderOption() {
 String encodedRequestParams = "param1=value&param2.param3=value23";
 GrpcCallContext context =
   GrpcCallContext.createDefault().withRequestParamsDynamicHeaderOption(encodedRequestParams);
 Map<Key<String>, String> headers =
   CallOptionsUtil.getDynamicHeadersOption(context.getCallOptions());
 assertEquals(
   ImmutableMap.of(CallOptionsUtil.REQUEST_PARAMS_HEADER_KEY, encodedRequestParams), headers);
}
com.google.api.gax.grpcGrpcCallContextwithRequestParamsDynamicHeaderOption

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
  • nullToSelf
    Returns inputContext cast to GrpcCallContext, or an empty GrpcCallContext if inputContext is null.
  • 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
  • <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
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Top PhpStorm plugins
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