Interface RequestMetadataCallback (1.28.0)

public interface 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)

public abstract void onFailure(Throwable exception)

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)

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

Called when metadata is successfully produced.

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

Metadata returned for the request.