Interface RequestMetadataCallback (1.24.0)

public interface RequestMetadataCallback

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


onFailure(Throwable exception)

public abstract void onFailure(Throwable exception)

Called when metadata generation failed.

Name Description
exception Throwable

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

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

public abstract void onSuccess(Map<String,List<String>> metadata)

Called when metadata is successfully produced.

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

Metadata returned for the request.