Record Class PushTargetOutcomeImpl

java.lang.Object
java.lang.Record
com.iizix.server.push.api.PushTargetOutcomeImpl
Record Components:
userID - The user ID.
userName - The user name, never null, empty when unknown.
deviceUUID - The device UUID, null for an in-session target without one.
transport - The transport, null for an in-session target.
appID - The canonical application ID.
topic - The Topic, empty for the application level.
outcome - The outcome.
reason - The reason of a failure, null for a delivery.
All Implemented Interfaces:
IPushTargetOutcome

public record PushTargetOutcomeImpl(long userID, String userName, String deviceUUID, PushTransport transport, String appID, String topic, DeliveryOutcome outcome, String reason) extends Record implements IPushTargetOutcome
The outcome of a send for one target, as the Java API reports it.
Author:
Christopher Mindus
  • Constructor Details

    • PushTargetOutcomeImpl

      public PushTargetOutcomeImpl(long userID, String userName, String deviceUUID, PushTransport transport, String appID, String topic, DeliveryOutcome outcome, String reason)
      Creates an instance of a PushTargetOutcomeImpl record class.
      Parameters:
      userID - the value for the userID record component
      userName - the value for the userName record component
      deviceUUID - the value for the deviceUUID record component
      transport - the value for the transport record component
      appID - the value for the appID record component
      topic - the value for the topic record component
      outcome - the value for the outcome record component
      reason - the value for the reason record component
  • Method Details

    • of

      public static PushTargetOutcomeImpl of(DeliveryTarget target, DeliveryOutcome outcome, String detail, String userName)
      Builds the outcome of an engine target.
      Parameters:
      target - The target.
      outcome - The outcome.
      detail - The engine's diagnostic, null or empty for none.
      userName - The user name, null for unknown.
      Returns:
      The outcome.
    • getUserID

      public long getUserID()
      Description copied from interface: IPushTargetOutcome
      Gets the ID of the user the target belongs to.
      Specified by:
      getUserID in interface IPushTargetOutcome
      Returns:
      The user ID, IZS.USERS.uid; -1 for the in-session target of a client session without an authenticated user, which sendToClient reaches (ruled 2026-09-26, CC-PUSH-ROADMAP row 3 B).
    • getUserName

      public String getUserName()
      Description copied from interface: IPushTargetOutcome
      Gets the name of the user the target belongs to.
      Specified by:
      getUserName in interface IPushTargetOutcome
      Returns:
      The user name, never null; empty for the target of a session without an authenticated user.
    • getDeviceUUID

      public String getDeviceUUID()
      Description copied from interface: IPushTargetOutcome
      Gets the device UUID of the target.
      Specified by:
      getDeviceUUID in interface IPushTargetOutcome
      Returns:
      The canonical 36-character UUID, or null for an in-session target whose client session has not reported one.
    • getTransport

      public PushTransport getTransport()
      Description copied from interface: IPushTargetOutcome
      Gets the transport the target was sent through.
      Specified by:
      getTransport in interface IPushTargetOutcome
      Returns:
      The transport, or null for a target reached or attempted in-session.
    • getAppID

      public String getAppID()
      Description copied from interface: IPushTargetOutcome
      Gets the application ID the target was matched under.
      Specified by:
      getAppID in interface IPushTargetOutcome
      Returns:
      The canonical application ID, never null.
    • getTopic

      public String getTopic()
      Description copied from interface: IPushTargetOutcome
      Gets the topic the target was matched under.
      Specified by:
      getTopic in interface IPushTargetOutcome
      Returns:
      The topic, the empty string for the application level; never null.
    • getOutcome

      public DeliveryOutcome getOutcome()
      Description copied from interface: IPushTargetOutcome
      Gets the outcome.
      Specified by:
      getOutcome in interface IPushTargetOutcome
      Returns:
      The outcome, never null.
    • getReason

      public String getReason()
      Description copied from interface: IPushTargetOutcome
      Gets the reason for an outcome that is not a delivery, as the transport or the engine gave it.
      Specified by:
      getReason in interface IPushTargetOutcome
      Returns:
      The reason, or null for DeliveryOutcome.DELIVERED and DeliveryOutcome.DELIVERED_IN_SESSION. Never key material.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • userID

      public long userID()
      Returns the value of the userID record component.
      Returns:
      the value of the userID record component
    • userName

      public String userName()
      Returns the value of the userName record component.
      Returns:
      the value of the userName record component
    • deviceUUID

      public String deviceUUID()
      Returns the value of the deviceUUID record component.
      Returns:
      the value of the deviceUUID record component
    • transport

      public PushTransport transport()
      Returns the value of the transport record component.
      Returns:
      the value of the transport record component
    • appID

      public String appID()
      Returns the value of the appID record component.
      Returns:
      the value of the appID record component
    • topic

      public String topic()
      Returns the value of the topic record component.
      Returns:
      the value of the topic record component
    • outcome

      public DeliveryOutcome outcome()
      Returns the value of the outcome record component.
      Returns:
      the value of the outcome record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component