Package com.nimbusds.jose.util.health
Class HealthReport<S,C extends SecurityContext>
java.lang.Object
com.nimbusds.jose.util.health.HealthReport<S,C>
- All Implemented Interfaces:
Event<S,C>
@Immutable
public class HealthReport<S,C extends SecurityContext>
extends Object
implements Event<S,C>
Health report.
- Version:
- 2022-08-29
- Author:
- Vladimir Dzhuvinov
-
Constructor Summary
ConstructorsConstructorDescriptionHealthReport(S source, HealthStatus status, long timestamp, C context) Creates a new health report.HealthReport(S source, HealthStatus status, Exception exception, long timestamp, C context) Creates a new health report. -
Method Summary
Modifier and TypeMethodDescriptionReturns the optional context.Returns the recorded exception in case of aHealthStatus.NOT_HEALTHY.Returns the health status.Returns the event source.longReturns the timestamp.toString()
-
Constructor Details
-
HealthReport
Creates a new health report.- Parameters:
source- The event source.status- The health status. Must not benull.timestamp- The timestamp, in milliseconds since the Unix epoch.context- The optional context,nullif not specified.
-
HealthReport
Creates a new health report.- Parameters:
source- The event source.status- The health status. Must not benull.exception- The exception in case of aHealthStatus.NOT_HEALTHY,nullif not specified.timestamp- The timestamp, in milliseconds since the Unix epoch.context- The optional context,nullif not specified.
-
-
Method Details
-
getSource
Description copied from interface:EventReturns the event source.- Specified by:
getSourcein interfaceEvent<S,C extends SecurityContext> - Returns:
- The event source.
-
getContext
Description copied from interface:EventReturns the optional context.- Specified by:
getContextin interfaceEvent<S,C extends SecurityContext> - Returns:
- The optional context,
nullif not specified.
-
getHealthStatus
Returns the health status.- Returns:
- The health status.
-
getException
Returns the recorded exception in case of aHealthStatus.NOT_HEALTHY.- Returns:
- The exception,
nullif not specified.
-
getTimestamp
Returns the timestamp.- Returns:
- The timestamp, in milliseconds since the Unix epoch.
-
toString
-