Package io.micronaut.gcp
Class UserAgentHeaderProvider
- java.lang.Object
-
- io.micronaut.gcp.UserAgentHeaderProvider
-
- All Implemented Interfaces:
com.google.api.gax.rpc.HeaderProvider
public class UserAgentHeaderProvider extends java.lang.Object implements com.google.api.gax.rpc.HeaderProvider
Provides the User-Agent header to signal to the Google Cloud Client Libraries that requests originate from a Micronaut Integration.- Author:
- João André Martins, Chengyuan Zhao, Mike Eltsufin, Ray Tsang
-
-
Constructor Summary
Constructors Constructor Description UserAgentHeaderProvider(java.lang.String component)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getHeaders()
Returns the "User-Agent" header whose value should be added to the google-cloud-java REST API calls.java.lang.String
getUserAgent()
Returns the "User-Agent" header value which should be added to the google-cloud-java REST API calls.
-
-
-
Method Detail
-
getHeaders
public java.util.Map<java.lang.String,java.lang.String> getHeaders()
Returns the "User-Agent" header whose value should be added to the google-cloud-java REST API calls. e.g.,User-Agent: Micronaut/1.0.0.RELEASE micronaut-gcp-trace/1.0.0.RELEASE
.- Specified by:
getHeaders
in interfacecom.google.api.gax.rpc.HeaderProvider
-
getUserAgent
public java.lang.String getUserAgent()
Returns the "User-Agent" header value which should be added to the google-cloud-java REST API calls. e.g.,Micronaut/1.0.0.RELEASE micronaut-gcp-trace/1.0.0.RELEASE
.- Returns:
- the user agent string.
-
-