Record Class ManagedApplicationProbe

java.lang.Object
java.lang.Record
org.j7m.middleware.application.api.ManagedApplicationProbe
Record Components:
id - stable opaque component/probe identity, never a caller or payload identifier
kind - operational probe purpose
check - actual host-admitted application callback; may throw when the activation is unavailable

public record ManagedApplicationProbe(String id, ManagedProbeKind kind, Callable<Boolean> check) extends Record
Host-only callable for one exact activation generation; it is not a wire DTO or authority token. Each actual call owns an in-flight slot until application code returns, including after a caller timeout. Hosts supply bounded/coalescing execution rather than invoking probes under a monitor.
  • Constructor Details

    • ManagedApplicationProbe

      public ManagedApplicationProbe(String id, ManagedProbeKind kind, Callable<Boolean> check)
      Validates a bounded host handle.
      Parameters:
      id - nonblank safe opaque identity of at most128 characters
      kind - nonnull probe purpose
      check - callback bound to the exact owning activation
      Throws:
      IllegalArgumentException - for invalid identity
      NullPointerException - for a missing kind or callback
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • kind

      public ManagedProbeKind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • check

      public Callable<Boolean> check()
      Returns the value of the check record component.
      Returns:
      the value of the check record component