public class RespokeGroup
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
RespokeGroup.GetGroupMembersCompletionListener
A listener interface to receive a notification that the task to get the list of group members has completed
|
static interface |
RespokeGroup.Listener
A listener interface to notify the receiver of events occurring with the group
|
| Constructor and Description |
|---|
RespokeGroup(java.lang.String newGroupID,
RespokeSignalingChannel channel,
RespokeClient newClient)
The constructor for this class
|
| Modifier and Type | Method and Description |
|---|---|
void |
connectionDidJoin(RespokeConnection connection)
Notify the group that a connection has joined.
|
void |
connectionDidLeave(RespokeConnection connection)
Notify the group that a connection has left.
|
void |
didReceiveMessage(java.lang.String message,
RespokeEndpoint endpoint,
java.util.Date timestamp)
Notify the group that a group message was received.
|
java.lang.String |
getGroupID()
Get the ID for this group
|
void |
getMembers(RespokeGroup.GetGroupMembersCompletionListener completionListener)
Get an array containing the members of the group.
|
boolean |
isJoined()
Return true if the local client is a member of this group and false if not.
|
void |
leave(Respoke.TaskCompletionListener completionListener)
Leave this group
|
void |
sendMessage(java.lang.String message,
boolean push,
Respoke.TaskCompletionListener completionListener)
Send a message to the entire group.
|
void |
setListener(RespokeGroup.Listener listener)
Set a receiver for the Listener interface
|
public RespokeGroup(java.lang.String newGroupID,
RespokeSignalingChannel channel,
RespokeClient newClient)
newGroupID - The ID for this groupchannel - The signaling channel managing communications with this groupnewClient - The client to which this group instance belongspublic void setListener(RespokeGroup.Listener listener)
listener - The new receiver for events from the Listener interface for this group instancepublic void getMembers(RespokeGroup.GetGroupMembersCompletionListener completionListener)
completionListener - A listener to receive a notification on the success of the asynchronous operationpublic void leave(Respoke.TaskCompletionListener completionListener)
completionListener - A listener to receive a notification on the success of the asynchronous operationpublic boolean isJoined()
public java.lang.String getGroupID()
public void sendMessage(java.lang.String message,
boolean push,
Respoke.TaskCompletionListener completionListener)
message - The message to sendpush - A flag indicating if a push notification should be sent for this messagecompletionListener - A listener to receive a notification on the success of the asynchronous operationpublic void connectionDidJoin(RespokeConnection connection)
connection - The connection that has joined the grouppublic void connectionDidLeave(RespokeConnection connection)
connection - The connection that has left the grouppublic void didReceiveMessage(java.lang.String message,
RespokeEndpoint endpoint,
java.util.Date timestamp)
message - The body of the messageendpoint - The endpoint that sent the messagetimestamp - The message timestamp