Annotation Interface ConditionalHealthCheckOnTrajectory


@Retention(RUNTIME) @Target(METHOD) public @interface ConditionalHealthCheckOnTrajectory
This annotation will need to be used at the spring Configuration class This annotation does the same thing as ConditionalOnTrajectory However it does this behaviour for health checkers rather than the services You can then use this annotation to accomplish this.
 :
  // original health checker that needs to be replaced for specific trajectories
  @Bean public HealthChecker testHealthChecker(){ return new TestHealthChecker(); }
  // replace with this new health checker only for trajectory id "t1"
  @Bean @ConditionalHealthCheckOnTrajectory(id = "t1", service = "testService")
  public HealthChecker testHealthChecker1(){ return new TestHealthChecker1();}
 
The code above replaces all instances of TestHealthChecker with TestHealthChecker1 but will do so only for trajectory ID "t1"
Author:
Raja Shankar Kolluru
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The trajectory ID for which the reference is replaced
    The service name that is being replaced with this new health checker
  • Element Details

    • id

      String id
      The trajectory ID for which the reference is replaced
      Returns:
    • service

      String service
      The service name that is being replaced with this new health checker
      Returns: