Class JmsHealthIndicator

java.lang.Object
org.springframework.boot.health.contributor.AbstractHealthIndicator
org.springframework.boot.jms.health.JmsHealthIndicator
All Implemented Interfaces:
org.springframework.boot.health.contributor.HealthContributor, org.springframework.boot.health.contributor.HealthIndicator

public class JmsHealthIndicator extends org.springframework.boot.health.contributor.AbstractHealthIndicator
HealthIndicator for a JMS ConnectionFactory.
Since:
4.0.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Duration
    Default timeout to use when starting a connection for the health check.
  • Constructor Summary

    Constructors
    Constructor
    Description
    JmsHealthIndicator(jakarta.jms.ConnectionFactory connectionFactory)
    Create a new JmsHealthIndicator instance with a default start timeout.
    JmsHealthIndicator(jakarta.jms.ConnectionFactory connectionFactory, Duration startTimeout)
    Create a new JmsHealthIndicator instance with the given startTimeout.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doHealthCheck(org.springframework.boot.health.contributor.Health.Builder builder)
     

    Methods inherited from class org.springframework.boot.health.contributor.AbstractHealthIndicator

    health

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.boot.health.contributor.HealthIndicator

    health
  • Field Details

    • DEFAULT_START_TIMEOUT

      public static final Duration DEFAULT_START_TIMEOUT
      Default timeout to use when starting a connection for the health check.
  • Constructor Details

    • JmsHealthIndicator

      public JmsHealthIndicator(jakarta.jms.ConnectionFactory connectionFactory)
      Create a new JmsHealthIndicator instance with a default start timeout.
      Parameters:
      connectionFactory - the connection factory to use
    • JmsHealthIndicator

      public JmsHealthIndicator(jakarta.jms.ConnectionFactory connectionFactory, Duration startTimeout)
      Create a new JmsHealthIndicator instance with the given startTimeout.
      Parameters:
      connectionFactory - the connection factory to use
      startTimeout - timeout to use when starting a connection for the health check
      Since:
      4.2.0
  • Method Details

    • doHealthCheck

      protected void doHealthCheck(org.springframework.boot.health.contributor.Health.Builder builder) throws Exception
      Specified by:
      doHealthCheck in class org.springframework.boot.health.contributor.AbstractHealthIndicator
      Throws:
      Exception