Record Class BatchSendResult.ItemResult
java.lang.Object
java.lang.Record
cloud.opencode.base.email.BatchSendResult.ItemResult
- Record Components:
email- the email that was sent | 被发送的邮件messageId- the message ID (null if failed) | 消息ID(失败时为null)success- whether the send succeeded | 是否发送成功error- the error message (null if succeeded) | 错误消息(成功时为null)cause- the exception cause (null if succeeded) | 异常原因(成功时为null)
- Enclosing class:
BatchSendResult
-
Constructor Summary
ConstructorsConstructorDescriptionItemResult(Email email, String messageId, boolean success, String error, Throwable cause) Creates an instance of aItemResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.email()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.static BatchSendResult.ItemResultCreate a failure result 创建失败结果final inthashCode()Returns a hash code value for this object.Returns the value of themessageIdrecord component.booleansuccess()Returns the value of thesuccessrecord component.static BatchSendResult.ItemResultCreate a success result 创建成功结果final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemResult
Creates an instance of aItemResultrecord class.
-
-
Method Details
-
success
Create a success result 创建成功结果- Parameters:
email- the email | 邮件messageId- the message ID | 消息ID- Returns:
- the result | 结果
-
failure
Create a failure result 创建失败结果- Parameters:
email- the email | 邮件cause- the exception | 异常- Returns:
- the result | 结果
-
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. -
email
-
messageId
-
success
-
error
-
cause
-