public abstract class HttpCredentialsFetcher extends Object implements CredentialsFetcher
Constructor and Description |
---|
HttpCredentialsFetcher() |
Modifier and Type | Method and Description |
---|---|
abstract URL |
buildUrl()
Constructs the url of authorization server.
|
Credentials |
fetch()
Fetches credentials from the authorization server.
|
Credentials |
fetch(int retryTimes)
Fetches credentials from the authorization server.
|
abstract Credentials |
parse(com.aliyuncs.http.HttpResponse response)
Parses the response to get credentials.
|
com.aliyuncs.http.HttpResponse |
send(com.aliyuncs.http.HttpRequest request)
Sends http request to authorization server.
|
public abstract URL buildUrl() throws com.aliyuncs.exceptions.ClientException
CredentialsFetcher
buildUrl
in interface CredentialsFetcher
com.aliyuncs.exceptions.ClientException
public abstract Credentials parse(com.aliyuncs.http.HttpResponse response) throws com.aliyuncs.exceptions.ClientException
CredentialsFetcher
parse
in interface CredentialsFetcher
response
- http response.com.aliyuncs.exceptions.ClientException
public Credentials fetch() throws com.aliyuncs.exceptions.ClientException
CredentialsFetcher
fetch
in interface CredentialsFetcher
com.aliyuncs.exceptions.ClientException
public com.aliyuncs.http.HttpResponse send(com.aliyuncs.http.HttpRequest request) throws IOException
CredentialsFetcher
send
in interface CredentialsFetcher
request
- http request.IOException
public Credentials fetch(int retryTimes) throws com.aliyuncs.exceptions.ClientException
CredentialsFetcher
fetch
in interface CredentialsFetcher
retryTimes
- retry times.com.aliyuncs.exceptions.ClientException
Copyright © 2021. All Rights Reserved.