Class StatusCodeSupplier

java.lang.Object
lv.id.jc.piglatin.actuator.StatusCodeSupplier
All Implemented Interfaces:
IntSupplier

@Component public class StatusCodeSupplier extends Object implements IntSupplier
  • Constructor Details

    • StatusCodeSupplier

      public StatusCodeSupplier(HttpClient httpClient)
  • Method Details

    • getAsInt

      public int getAsInt()
      Returns the HTTP response code obtained by making a GET request to the specified base URL.
      Specified by:
      getAsInt in interface IntSupplier
      Returns:
      The HTTP response code.
      Throws:
      RuntimeException - if an IOException or InterruptedException occurs during the execution of the GET request.