public class MessageDeliveryFailedEvent
extends java.util.EventObject
Modifier and Type | Field and Description |
---|---|
static int |
INTERNAL_ERROR
Set when delivery fails for implementation specific reasons.
|
static int |
NETWORK_FAILURE
Set when delivery fails due to a failure in network communications or
a transport error.
|
static int |
OFFLINE_MESSAGES_NOT_SUPPORTED
Set when delivery fails because we're trying to send a message to a
contact that is currently offline and the server does not support
offline messages.
|
static int |
PROVIDER_NOT_REGISTERED
Set to indicate that delivery has failed because the provider was not
registered.
|
static int |
UNKNOWN_ERROR
Set when no other error code can describe the exception that occurred.
|
static int |
UNSUPPORTED_OPERATION
Set when delivery fails because of dependency on an operation that is
unsupported.
|
Constructor and Description |
---|
MessageDeliveryFailedEvent(Message source,
Contact to,
int errorCode)
Constructor.
|
MessageDeliveryFailedEvent(Message source,
Contact to,
int errorCode,
long timestamp)
Creates a MessageDeliveryFailedEvent indicating failure of
delivery of the source message to the specified to
contact.
|
MessageDeliveryFailedEvent(Message source,
Contact to,
int errorCode,
long timestamp,
java.lang.String reason)
Creates a MessageDeliveryFailedEvent indicating failure of
delivery of the source message to the specified to
contact.
|
MessageDeliveryFailedEvent(Message source,
Contact to,
java.lang.String correctedMessageUID,
int errorCode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCorrectedMessageUID()
Sets the ID of the message being corrected to the passed ID.
|
Contact |
getDestinationContact()
Returns a reference to the Contact that the source (failed)
Message was sent to.
|
int |
getErrorCode()
Returns an error code descibing the reason for the failure of the
message delivery.
|
java.lang.String |
getReason()
Returns a human readable message indicating the reason for the failure
or null if the reason is unknown.
|
Message |
getSourceMessage()
Returns the message that triggered this event
|
long |
getTimestamp()
A timestamp indicating the exact date when the event ocurred (in this
case it is the moment when it was determined that message delivery has
failed).
|
public static final int UNKNOWN_ERROR
public static final int NETWORK_FAILURE
public static final int PROVIDER_NOT_REGISTERED
public static final int INTERNAL_ERROR
public static final int OFFLINE_MESSAGES_NOT_SUPPORTED
public static final int UNSUPPORTED_OPERATION
public MessageDeliveryFailedEvent(Message source, Contact to, int errorCode)
source
- the messageto
- the "to" contacterrorCode
- error codepublic MessageDeliveryFailedEvent(Message source, Contact to, java.lang.String correctedMessageUID, int errorCode)
source
- the messageto
- the "to" contactcorrectedMessageUID
- The ID of the message being corrected.errorCode
- error codepublic MessageDeliveryFailedEvent(Message source, Contact to, int errorCode, long timestamp)
source
- the Message whose delivery this event represents.to
- the Contact that this message was sent to.errorCode
- an errorCode indicating the reason of the failure.timestamp
- the exacte Date when it was determined that delivery
had failed.public MessageDeliveryFailedEvent(Message source, Contact to, int errorCode, long timestamp, java.lang.String reason)
source
- the Message whose delivery this event represents.to
- the Contact that this message was sent to.errorCode
- an errorCode indicating the reason of the failure.timestamp
- the exact timestamp when it was determined that delivery
had failed.reason
- a human readable message indicating the reason for the
failure or null if the reason is unknown.public Contact getDestinationContact()
public Message getSourceMessage()
public int getErrorCode()
public long getTimestamp()
public java.lang.String getReason()
public java.lang.String getCorrectedMessageUID()
correctedMessageUID
- The ID of the message being corrected.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.