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