Skip to content

MessageResponse

This docs was updated at: 2026-02-23

com.paragon.messaging.core.MessageResponse  ยท  Record


Resposta do envio de uma mensagem.

Methods

MessageResponse

public MessageResponse(String messageId, MessageStatus status, Instant timestamp)

Constructor without error or conversationId (successful response).


MessageResponse

public MessageResponse(String messageId, MessageStatus status, Instant timestamp, String error)

Constructor without conversationId.


MessageResponse

public MessageResponse(
      String messageId, MessageStatus status, Instant timestamp, Optional<String> conversationId)

Constructor without error (successful response with conversationId).


success

public boolean success()

Returns true if this response represents a successful send.

Returns

true if error is null


accepted

public static MessageResponse accepted(String messageId)

Creates an accepted response with current timestamp.

Parameters

Name Description
messageId the message ID

Returns

accepted response


failed

public static MessageResponse failed(String error)

Creates a failed response with current timestamp.

Parameters

Name Description
error the error description

Returns

failed response