public class Channel
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
Channel.ChannelStatus
The Channel.ChannelStatus enum represents the various states of the member with respect to
this channel.
|
static class |
Channel.ChannelType
Enumeration indicating the channel's visibility.
|
static class |
Channel.SynchronizationStatus
Enumeration indicating synchronization status for channel
|
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Channel> |
CREATOR |
Constructor and Description |
---|
Channel(java.lang.String sid,
java.lang.String friendlyName,
java.lang.String uniqueName,
long nativeHandle,
int status,
int type) |
Channel(java.lang.String sid,
java.lang.String friendlyName,
java.lang.String uniqueName,
long nativeHandle,
int status,
int type,
IPMessagingClient ipmsgClient) |
Modifier and Type | Method and Description |
---|---|
void |
declineInvitation(Constants.StatusListener listener)
Declines an invite on this channel.
|
int |
describeContents() |
void |
destroy(Constants.StatusListener listener)
Destroys the current channel.
|
org.json.JSONObject |
getAttributes()
Custom attributes associated with the Channel.
|
java.lang.String |
getDateCreated()
Get creation date of the channel as an ISO8601 string.
|
java.util.Date |
getDateCreatedAsDate()
Get creation date of the channel.
|
java.lang.String |
getDateUpdated()
Get update date of the channel as an ISO8601 string.
|
java.util.Date |
getDateUpdatedAsDate()
Get update date of the channel.
|
java.lang.String |
getFriendlyName()
Method that returns the friendlyName of the channel.
|
ChannelListener |
getListener()
Method to retrieve ChannelListener for this Channel.
|
Members |
getMembers()
Method to get the channel members.
|
Messages |
getMessages()
Method to get messages.
|
java.lang.String |
getSid()
Method that returns the unique identifier for this channel.
|
Channel.ChannelStatus |
getStatus()
Returns the current user's status on this channel.
|
Channel.SynchronizationStatus |
getSynchronizationStatus()
Get the current synchronization status for channel.
|
Channel.ChannelType |
getType()
Method to get the channel type.
|
java.lang.String |
getUniqueName()
Method that returns the unique Name of the channel.
|
void |
handleDeleteMessage(Message message) |
void |
handleEditMessage(Message message) |
void |
handleIncomingMessage(Message message) |
void |
handleOnChannelSync(Channel channel) |
void |
handleOnMemberChange(Member member) |
void |
handleOnMemberDelete(Member member) |
void |
handleOnMemberJoin(Member member) |
void |
handleOnTypingEnded(Member member) |
void |
handleOnTypingStarted(Member member) |
void |
join(Constants.StatusListener listener)
Joins the current user to the channel.
|
void |
leave(Constants.StatusListener listener)
Leaves the current channel.
|
void |
removeListener()
Method to remove ChannelListener for this Channel.
|
void |
setAttributes(org.json.JSONObject updatedAttributes,
Constants.StatusListener listener)
Updates the attribute data for this channel.
|
void |
setFriendlyName(java.lang.String friendlyName,
Constants.StatusListener listener)
Updates the friendly name for this channel.
|
void |
setListener(ChannelListener listener)
Method to set ChannelListener for this Channel.
|
void |
setUniqueName(java.lang.String uniqueName,
Constants.StatusListener listener)
Updates the unique name for this channel.
|
void |
synchronize(Constants.CallbackListener<Channel> listener)
Synchronize the channel.
|
void |
typing()
Called when Member starts typing on this channel.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<Channel> CREATOR
public Channel(java.lang.String sid, java.lang.String friendlyName, java.lang.String uniqueName, long nativeHandle, int status, int type, IPMessagingClient ipmsgClient)
public Channel(java.lang.String sid, java.lang.String friendlyName, java.lang.String uniqueName, long nativeHandle, int status, int type)
public java.lang.String getSid()
public java.lang.String getFriendlyName()
public void setFriendlyName(java.lang.String friendlyName, Constants.StatusListener listener)
friendlyName
- updated friendly name.listener
- Listener that will receive callback with the result.public org.json.JSONObject getAttributes()
public void setAttributes(org.json.JSONObject updatedAttributes, Constants.StatusListener listener)
updatedAttributes
- attributes to change.listener
- Listener that will receive callback with the result.public Messages getMessages()
public Channel.ChannelStatus getStatus()
public ChannelListener getListener()
public void setListener(ChannelListener listener)
listener
- A channel listener.public void removeListener()
public Members getMembers()
public Channel.ChannelType getType()
public java.lang.String getUniqueName()
public void setUniqueName(java.lang.String uniqueName, Constants.StatusListener listener)
uniqueName
- The new unique name for this channel.listener
- Listener that will receive callback with the result.public void join(Constants.StatusListener listener)
listener
- Listener that will receive callback with the result.public void leave(Constants.StatusListener listener)
listener
- Listener that will receive callback with the result.public void destroy(Constants.StatusListener listener)
listener
- Listener that will receive callback with the result.public void declineInvitation(Constants.StatusListener listener)
listener
- Listener that will receive callback with the result.public void typing()
public Channel.SynchronizationStatus getSynchronizationStatus()
public void synchronize(Constants.CallbackListener<Channel> listener)
listener
- callback listenerpublic java.lang.String getDateCreated()
public java.util.Date getDateCreatedAsDate()
public java.lang.String getDateUpdated()
public java.util.Date getDateUpdatedAsDate()
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
public void handleIncomingMessage(Message message)
public void handleEditMessage(Message message)
public void handleDeleteMessage(Message message)
public void handleOnMemberJoin(Member member)
public void handleOnMemberChange(Member member)
public void handleOnMemberDelete(Member member)
public void handleOnTypingStarted(Member member)
public void handleOnTypingEnded(Member member)
public void handleOnChannelSync(Channel channel)