Interface RequestMetadataCallback (1.6.1)

publicinterface RequestMetadataCallback

The callback that receives the result of the asynchronous Credentials#getRequestMetadata(java.net.URI, java.util.concurrent.Executor, RequestMetadataCallback). Exactly one method should be called.

Methods

onFailure(Throwable exception)

publicabstractvoidonFailure(Throwableexception)

Called when metadata generation failed.

Parameter
Name Description
exception Throwable

The thrown exception which caused the request metadata fetch to fail.

onSuccess(Map<String,List<String>> metadata)

publicabstractvoidonSuccess(Map<String,List<String>>metadata)

Called when metadata is successfully produced.

Parameter
Name Description
metadata Map<String,List<String>>

Metadata returned for the request.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.