Package org.entur.jwt.client
Class DefaultAccessTokenHealthProvider
java.lang.Object
org.entur.jwt.client.BaseAccessTokenProvider
org.entur.jwt.client.AbstractAccessTokenHealthProvider
org.entur.jwt.client.DefaultAccessTokenHealthProvider
- All Implemented Interfaces:
Closeable,AutoCloseable,AccessTokenHealthProvider,AccessTokenProvider
Lazy implementation of health provider.
Returns bad health if
- a previous invocation has failed, and a new invocation (by the indicator, from the top level) fails as well.
Returns good health if
- a previous invocation was successful, or
- a previous invocation has failed, but a new invocation (by the the indicator, from the top level) is successful.
Calls to this health indicator does not trigger a (remote) refresh if the last call to the underlying provider was successful.
Returns bad health if
- a previous invocation has failed, and a new invocation (by the indicator, from the top level) fails as well.
Returns good health if
- a previous invocation was successful, or
- a previous invocation has failed, but a new invocation (by the the indicator, from the top level) is successful.
Calls to this health indicator does not trigger a (remote) refresh if the last call to the underlying provider was successful.
-
Field Summary
Fields inherited from class org.entur.jwt.client.AbstractAccessTokenHealthProvider
providerStatus, refreshProvider, statusFields inherited from class org.entur.jwt.client.BaseAccessTokenProvider
logger, provider -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.entur.jwt.client.AbstractAccessTokenHealthProvider
getAccessToken, getHealth, setRefreshProvider, supportsHealthMethods inherited from class org.entur.jwt.client.BaseAccessTokenProvider
close, getProvider
-
Constructor Details
-
DefaultAccessTokenHealthProvider
-
-
Method Details
-
getRefreshHealth
- Specified by:
getRefreshHealthin classAbstractAccessTokenHealthProvider
-