congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • findViewById (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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