Package org.keycloak.events.outbox
Record Class OutboxDeliveryResult
java.lang.Object
java.lang.Record
org.keycloak.events.outbox.OutboxDeliveryResult
public record OutboxDeliveryResult(OutboxDeliveryOutcome outcome, String errorMessage)
extends Record
Per-row result returned by an
OutboxDeliveryHandler.deliver(org.keycloak.models.KeycloakSession, org.keycloak.models.jpa.entities.OutboxEntryEntity)
invocation. Bundles the outcome with a
single operator-facing errorMessage that the drainer
persists into the row's last_error column.
Handlers should put as much diagnostic detail into
errorMessage as fits the column (VARCHAR(2048)) —
status code, response body excerpt, exception class — so admin
dashboards and log scans show the failure cause without having to
cross-reference timestamps in server logs.
delivered() / orphaned() return null for the
message; the drainer clears last_error on a successful
delivery.
-
Constructor Summary
ConstructorsConstructorDescriptionOutboxDeliveryResult(OutboxDeliveryOutcome outcome, String errorMessage) Creates an instance of aOutboxDeliveryResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic OutboxDeliveryResultdeadLetter(String errorMessage) static OutboxDeliveryResultfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.final inthashCode()Returns a hash code value for this object.static OutboxDeliveryResultorphaned()static OutboxDeliveryResultoutcome()Returns the value of theoutcomerecord component.static OutboxDeliveryResultfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OutboxDeliveryResult
Creates an instance of aOutboxDeliveryResultrecord class.- Parameters:
outcome- the value for theoutcomerecord componenterrorMessage- the value for theerrorMessagerecord component
-
-
Method Details
-
delivered
-
retry
-
deadLetter
-
orphaned
-
orphaned
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
outcome
Returns the value of theoutcomerecord component.- Returns:
- the value of the
outcomerecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-