public class TokenCache extends Object
Modifier and Type | Method and Description |
---|---|
static TokenCache |
getInstance()
Get TokenCache Instance
|
String |
getToken(String id,
Callable<String> callable)
This method returns the value in the cache, or computes it from the specified Callable
|
void |
removeToken(String id)
This method is called to remove the token from the cache when the endpoint is destroyed
|
public static TokenCache getInstance()
public String getToken(String id, Callable<String> callable) throws ExecutionException
id
- id of the oauth handlercallable
- to generate a new token by calling oauth serverExecutionException
public void removeToken(String id)
id
- id of the endpointCopyright © 2005–2023 Apache Software Foundation. All rights reserved.