title: How do I get the GRPC Metadata sent by a client on the service implementation?
body: <p>I am able to obtain the Metadata using an interceptor on the channel so I can tell it is being sent.</p>
  <pre><code>.intercept(
    new ServerInterceptor() {
      @Override
      public &lt;ReqT, RespT&gt; ServerCall.Listener&lt;ReqT&gt; interceptCall(
          ServerCall&lt;ReqT, RespT&gt; call,
          Metadata headers,
          ServerCallHandler&lt;ReqT, RespT&gt; next) {
  
        System.out.println(headers);
        return next.startCall(call, headers);
      }
    })
  </code></pre>
  <p>But I was wondering how do I access it from a service implementation? Am I supposed to do some round about ThreadLocal work to pass it down?</p>
  <p>This is different from <a href="https://stackoverflow.com/questions/43479217/how-to-read-meta-data-in-grpc-using-java-at-client-side">How to read Meta data in gRPC using Java at client side</a> which talks about it on the client side.</p>