public T getValue() throws AmazonClientException, IllegalStateException {
        if (shouldDoBlockingRefresh()) {
            blockingRefresh();
        } else if (shouldDoAsyncRefresh()) {
            asyncRefresh();
        }

        return getRefreshedValue();
    }
Return a valid value, refreshing if necessary. May return the current value, do an async
refresh if possible, or do a blocking refresh if needed.

@throws AmazonClientException If error occurs during refresh.
@throws IllegalStateException If value if invalid after refreshing.
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java