Package com.nimbusds.jose.jwk.source
Class JWKSetSourceWithHealthStatusReporting<C extends SecurityContext>
java.lang.Object
com.nimbusds.jose.jwk.source.JWKSetSourceWrapper<C>
com.nimbusds.jose.jwk.source.JWKSetSourceWithHealthStatusReporting<C>
- All Implemented Interfaces:
JWKSetSource<C>
,Closeable
,AutoCloseable
@ThreadSafe
public class JWKSetSourceWithHealthStatusReporting<C extends SecurityContext>
extends JWKSetSourceWrapper<C>
Decorates a JWKSetSource with health status reporting.
- Version:
- 2022-11-22
- Author:
- Thomas Rørvik Skjølberg, Vladimir Dzhuvinov
-
Constructor Summary
ConstructorsConstructorDescriptionJWKSetSourceWithHealthStatusReporting
(JWKSetSource<C> source, HealthReportListener<JWKSetSourceWithHealthStatusReporting<C>, C> healthReportListener) Creates a new JWK set source with health status reporting to the specified listener. -
Method Summary
Modifier and TypeMethodDescriptiongetJWKSet
(JWKSetCacheRefreshEvaluator refreshEvaluator, long currentTime, C context) Gets the JWK set.Methods inherited from class com.nimbusds.jose.jwk.source.JWKSetSourceWrapper
close, getSource
-
Constructor Details
-
JWKSetSourceWithHealthStatusReporting
public JWKSetSourceWithHealthStatusReporting(JWKSetSource<C> source, HealthReportListener<JWKSetSourceWithHealthStatusReporting<C>, C> healthReportListener) Creates a new JWK set source with health status reporting to the specified listener.- Parameters:
source
- The JWK set source to wrap. Must not benull
.healthReportListener
- The health report listener. Must not benull
.
-
-
Method Details
-
getJWKSet
public JWKSet getJWKSet(JWKSetCacheRefreshEvaluator refreshEvaluator, long currentTime, C context) throws KeySourceException Description copied from interface:JWKSetSource
Gets the JWK set.- Parameters:
refreshEvaluator
- Controls whether refresh of the JWK set cache (if utilised by the source) is required.currentTime
- The current time, in milliseconds since the Unix epoch.context
- Optional context,null
if not required.- Returns:
- The JWK set.
- Throws:
KeySourceException
- If JWK set retrieval failed.
-