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 Summary
ConstructorsConstructorDescriptionPushTargetOutcomeImpl(long userID, String userName, String deviceUUID, PushTransport transport, String appID, String topic, DeliveryOutcome outcome, String reason) Creates an instance of aPushTargetOutcomeImplrecord class.Method Summary
Modifier and TypeMethodDescriptionappID()Returns the value of theappIDrecord component.Returns the value of thedeviceUUIDrecord component.final booleanIndicates whether some other object is "equal to" this one.getAppID()Gets the application ID the target was matched under.Gets the device UUID of the target.Gets the outcome.Gets the reason for an outcome that is not a delivery, as the transport or the engine gave it.getTopic()Gets the topic the target was matched under.Gets the transport the target was sent through.longGets the ID of the user the target belongs to.Gets the name of the user the target belongs to.final inthashCode()Returns a hash code value for this object.static PushTargetOutcomeImplof(DeliveryTarget target, DeliveryOutcome outcome, String detail, String userName) Builds the outcome of an engine target.outcome()Returns the value of theoutcomerecord component.reason()Returns the value of thereasonrecord component.topic()Returns the value of thetopicrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransportrecord component.longuserID()Returns the value of theuserIDrecord component.userName()Returns the value of theuserNamerecord component.
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 aPushTargetOutcomeImplrecord class.- Parameters:
userID- the value for theuserIDrecord componentuserName- the value for theuserNamerecord componentdeviceUUID- the value for thedeviceUUIDrecord componenttransport- the value for thetransportrecord componentappID- the value for theappIDrecord componenttopic- the value for thetopicrecord componentoutcome- the value for theoutcomerecord componentreason- the value for thereasonrecord 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:IPushTargetOutcomeGets the ID of the user the target belongs to.- Specified by:
getUserIDin interfaceIPushTargetOutcome- Returns:
- The user ID,
IZS.USERS.uid; -1 for the in-session target of a client session without an authenticated user, whichsendToClientreaches (ruled 2026-09-26, CC-PUSH-ROADMAP row 3 B).
getUserName
Description copied from interface:IPushTargetOutcomeGets the name of the user the target belongs to.- Specified by:
getUserNamein interfaceIPushTargetOutcome- Returns:
- The user name, never
null; empty for the target of a session without an authenticated user.
getDeviceUUID
Description copied from interface:IPushTargetOutcomeGets the device UUID of the target.- Specified by:
getDeviceUUIDin interfaceIPushTargetOutcome- Returns:
- The canonical 36-character UUID, or
nullfor an in-session target whose client session has not reported one.
getTransport
Description copied from interface:IPushTargetOutcomeGets the transport the target was sent through.- Specified by:
getTransportin interfaceIPushTargetOutcome- Returns:
- The transport, or
nullfor a target reached or attempted in-session.
getAppID
Description copied from interface:IPushTargetOutcomeGets the application ID the target was matched under.- Specified by:
getAppIDin interfaceIPushTargetOutcome- Returns:
- The canonical application ID, never
null.
getTopic
Description copied from interface:IPushTargetOutcomeGets the topic the target was matched under.- Specified by:
getTopicin interfaceIPushTargetOutcome- Returns:
- The topic, the empty string for the application level; never
null.
getOutcome
Description copied from interface:IPushTargetOutcomeGets the outcome.- Specified by:
getOutcomein interfaceIPushTargetOutcome- Returns:
- The outcome, never
null.
getReason
Description copied from interface:IPushTargetOutcomeGets the reason for an outcome that is not a delivery, as the transport or the engine gave it.- Specified by:
getReasonin interfaceIPushTargetOutcome- Returns:
- The reason, or
nullforDeliveryOutcome.DELIVEREDandDeliveryOutcome.DELIVERED_IN_SESSION. Never key material.
toString
hashCode
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes.userID
userName
deviceUUID
Returns the value of thedeviceUUIDrecord component.- Returns:
- the value of the
deviceUUIDrecord component
transport
appID
topic
outcome
reason