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 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
-
Method Summary
Modifier and TypeMethodDescriptionReturns the "User-Agent" header whose value should be added to the google-cloud-java REST API calls.Returns the "User-Agent" header value which should be added to the google-cloud-java REST API calls.
-
Constructor Details
-
UserAgentHeaderProvider
Default constructor.- Parameters:
component
- The component
-
-
Method Details
-
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
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.
-