public class Group
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Group.PeerInfo
A class representing group peer information.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_APP_MESSAGE_LEN
Carrier App message max length.
|
static int |
MAX_GROUP_TITLE_LEN
Max Carrier group title length.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getId() |
Group.PeerInfo |
getPeer(java.lang.String peerId)
Get group peer information.
|
java.util.List<Group.PeerInfo> |
getPeers()
Get group peer list.
|
java.lang.String |
getTitle()
Get group title.
|
void |
invite(java.lang.String friendId)
Invite a specified friend into group.
|
void |
sendMessage(byte[] message)
Send a message to a group.
|
void |
setTitle(java.lang.String title)
Set group title.
|
public static final int MAX_APP_MESSAGE_LEN
public static final int MAX_GROUP_TITLE_LEN
public java.lang.String getId()
public void invite(java.lang.String friendId)
throws CarrierException
friendId - The invited friendIdjava.lang.IllegalArgumentException - illegal exception.CarrierException - carrier exception.public void sendMessage(byte[] message)
throws CarrierException
message - The message content defined by applicationjava.lang.IllegalArgumentException - illegal exception.CarrierException - carrier exception.public java.lang.String getTitle()
throws CarrierException
CarrierException - carrier exception.public void setTitle(java.lang.String title)
throws CarrierException
title - The title name to set(should be no longer than MAX_GROUP_TITLE_LEN)java.lang.IllegalArgumentException - illegal exception.CarrierException - carrier exception.public java.util.List<Group.PeerInfo> getPeers() throws CarrierException
CarrierException - carrier exception.public Group.PeerInfo getPeer(java.lang.String peerId) throws CarrierException
peerId - The target peerId to get it's informationjava.lang.IllegalArgumentException - illegal exception.CarrierException - carrier exception.