public abstract class

Event

extends Object
implements Parcelable
java.lang.Object
   ↳ com.nexmo.sdk.conversation.client.Event
Known Direct Subclasses

Class Overview

Event is a foundation for different types of messages

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
protected Conversation conversation
protected Date deletedTimestamp
protected Set<DeliveredReceipt> deliveredReceipts
protected String id
protected Member member
protected Set<SeenReceipt> seenReceiptList
protected Date timestamp
Protected Constructors
Event()
Event(String id, Date timestamp, Date deletedTimestamp)
Event(Parcel parcel)
Public Methods
void delete(RequestHandler<Void> eventDeleteListener)
Delete a message.
int describeContents()
boolean equals(Object o)
static Event fromCursor(Cursor cursor, Conversation conversation)
static Event fromJson(Conversation conversation, JSONObject messageObject)
Conversation getConversation()
Get the parent conversation of this event.
Date getDeletedTimestamp()
Get the delete timestamp of this message, if message was deleted already, otherwise is NULL.
Collection<DeliveredReceipt> getDeliveredReceipts()
Get the list of delivered receipts for this event.
String getId()
Get the event id of this message.
Member getMember()
Get the sender of this message.
Collection<SeenReceipt> getSeenReceipts()
Get the list of seen receipts for this event.
Date getTimestamp()
Get the timestamp at which this message was received.
abstract EventType getType()
int hashCode()
void markAsSeen(RequestHandler<SeenReceipt> listener)
Marks a message event as seen.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

protected Conversation conversation

protected Date deletedTimestamp

protected Set<DeliveredReceipt> deliveredReceipts

protected String id

protected Member member

protected Set<SeenReceipt> seenReceiptList

protected Date timestamp

Protected Constructors

protected Event ()

protected Event (String id, Date timestamp, Date deletedTimestamp)

protected Event (Parcel parcel)

Public Methods

public void delete (RequestHandler<Void> eventDeleteListener)

Delete a message.

Parameters
eventDeleteListener The listener in charge of dispatching the completion result.

public int describeContents ()

public boolean equals (Object o)

public static Event fromCursor (Cursor cursor, Conversation conversation)

public static Event fromJson (Conversation conversation, JSONObject messageObject)

Throws
JSONException

public Conversation getConversation ()

Get the parent conversation of this event.

Returns
  • The conversation.

public Date getDeletedTimestamp ()

Get the delete timestamp of this message, if message was deleted already, otherwise is NULL.

Returns
  • The deleted timestamp.

public Collection<DeliveredReceipt> getDeliveredReceipts ()

Get the list of delivered receipts for this event.

Returns
  • A list of delivery receipts.

public String getId ()

Get the event id of this message.

Returns
  • unique id of this event.

public Member getMember ()

Get the sender of this message.

Returns
  • The member that has sent this message.

public Collection<SeenReceipt> getSeenReceipts ()

Get the list of seen receipts for this event. Search the list for certain getMember() if needed.

Returns
  • A list of seen receipts.

public Date getTimestamp ()

Get the timestamp at which this message was received.

Returns
  • The received timestamp.

public abstract EventType getType ()

public int hashCode ()

public void markAsSeen (RequestHandler<SeenReceipt> listener)

Marks a message event as seen. Flag an Event as seen by the current member. Event cannot be un-seen.

Parameters
listener The listener in charge of dispatching the completion result.

public void writeToParcel (Parcel dest, int flags)