public interface SignallingService
Modifier and Type | Method and Description |
---|---|
InvocationFuture<java.lang.Void> |
acceptInvite(InviteParamBuilder paramBuilder)
The peer has accepted the invite request but may not join the channel.
|
InvocationFuture<ChannelFullInfo> |
acceptInviteAndJoin(InviteParamBuilder paramBuilder,
long selfUid)
Accept an invite request and join a channel
Error codes: 10420: Other devices has already joined the channel ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS_OTHER_CLIENT 10201: An invite request is sent, but the peer is offline ResponseCode.RES_PEER_NIM_OFFLINE 10404: Channel does not exist ResponseCode.RES_CHANNEL_NOT_EXISTS 10407: a member has already joined the channel ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS 10408: An invite request does not exist or has expired ResponseCode.RES_INVITE_NOT_EXISTS 10409: An invite request is already rejected ResponseCode.RES_INVITE_HAS_REJECT 10410: An invite request is accepted ResponseCode.RES_INVITE_HAS_ACCEPT 10417: uid conflict ResponseCode.RES_JOIN_CHANNEL_UID_CONFLICT 10419: Number of users exceeds the upper limit ResponseCode.RES_CHANNEL_MEMBER_EXCEED |
InvocationFuture<ChannelFullInfo> |
call(CallParamBuilder callParamBuilder)
Make a call to invite users to join a channel when the channel is created.
|
InvocationFuture<java.lang.Void> |
cancelInvite(InviteParamBuilder paramBuilder)
An invite request is cancelled
Error codes: 10404: Channel does not exist ResponseCode.RES_CHANNEL_NOT_EXISTS 10408: An invite request does not exist or has expired ResponseCode.RES_CHANNEL_NOT_EXISTS 10409: An invite request is already rejected ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS 10410: An invite request is accepted ResponseCode.RES_INVITE_HAS_ACCEPT |
InvocationFuture<java.lang.Void> |
close(java.lang.String channelId,
boolean offlineEnabled,
java.lang.String customInfo)
Close a channel
Error codes: 10406: a member does not exist in the channel ResponseCode.RES_CHANNEL_MEMBER_NOT_EXISTS |
InvocationFuture<ChannelBaseInfo> |
create(ChannelType type,
java.lang.String channelName,
java.lang.String channelExt)
Create a channel
The channel name is unique. |
InvocationFuture<java.lang.Void> |
invite(InviteParamBuilder paramBuilder)
Invite a user to join a channel
The inviter must the owner or member of a channel If a channel member wants to invite offline users, enable offline invitation and send an invitation message. |
InvocationFuture<ChannelFullInfo> |
join(java.lang.String channelId,
long selfUid,
java.lang.String customInfo,
boolean offlineEnable)
Join a channel
Error codes: 10407: a member has already joined the channel ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS 10417: uid conflict ResponseCode.RES_JOIN_CHANNEL_UID_CONFLICT 10419: Number of users exceeds the upper limit ResponseCode.RES_CHANNEL_MEMBER_EXCEED 10420: Other devices has already joined the channel ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS_OTHER_CLIENT |
InvocationFuture<java.lang.Void> |
leave(java.lang.String channelId,
boolean offlineEnable,
java.lang.String customInfo)
Leave a channel
Error codes: 10406: a member does not exist in the channel ResponseCode.RES_CHANNEL_MEMBER_NOT_EXISTS |
InvocationFuture<ChannelFullInfo> |
queryChannelFullInfo(java.lang.String channelName)
Query channelInfo based on channelName, an aggregate interface that replaces queryChannelInfo, queryChannelMemberCount, and queryChannelMemberList
10404: Channel does not exist
ResponseCode.RES_CHANNEL_NOT_EXISTS |
InvocationFuture<ChannelBaseInfo> |
queryChannelInfo(java.lang.String channelName)
Query channelInfo based on channelName
10404: Channel does not exist
ResponseCode.RES_CHANNEL_NOT_EXISTS |
InvocationFuture<java.lang.Integer> |
queryChannelMemberCount(java.lang.String channelName)
Query the number of people in the room based on channelName
10404: Channel does not exist
ResponseCode.RES_CHANNEL_NOT_EXISTS |
InvocationFuture<java.util.List<MemberInfo>> |
queryChannelMemberList(java.lang.String channelName)
Query the the list of people in the room based on channelName
10404: Channel does not exist
ResponseCode.RES_CHANNEL_NOT_EXISTS |
InvocationFuture<java.lang.Void> |
rejectInvite(InviteParamBuilder paramBuilder)
An invite request is rejected
Error codes: 10201: An invite request is sent, but the peer is offline ResponseCode.RES_PEER_NIM_OFFLINE 10404: channel does not exist ResponseCode.RES_CHANNEL_NOT_EXISTS 10408: An invite request does not exist or has expired ResponseCode.RES_CHANNEL_NOT_EXISTS 10409: An invite request is already rejected ResponseCode.RES_INVITE_HAS_REJECT 10410: An invite request is accepted ResponseCode.RES_INVITE_HAS_ACCEPT |
InvocationFuture<java.lang.Void> |
sendControl(java.lang.String channelId,
java.lang.String accountId,
java.lang.String customInfo)
The interface is used to transfer some custom command in pass-through mode Users that are not the member of a channel can also call the interface but the recipient must be the member or owner of a channel
Error codes: 10201: A command is sent, but the peer is offline ResponseCode.RES_PEER_NIM_OFFLINE 10404: Channel does not exist ResponseCode.RES_CHANNEL_NOT_EXISTS 10406: a member does not exist in the channel ResponseCode.RES_CHANNEL_MEMBER_NOT_EXISTS |
InvocationFuture<ChannelBaseInfo> create(ChannelType type, java.lang.String channelName, java.lang.String channelExt)
ResponseCode.RES_CHANNEL_HAS_EXISTS
type
- channel typechannelName
- channel name. A default channel name can be usedchannelExt
- custom extension field. Default values are available.InvocationFuture<java.lang.Void> close(java.lang.String channelId, boolean offlineEnabled, java.lang.String customInfo)
ResponseCode.RES_CHANNEL_MEMBER_NOT_EXISTS
channelId
- channel IDofflineEnabled
- Offline notificationcustomInfo
- custome info tranferred in a pass-through mode.InvocationFuture<ChannelFullInfo> join(java.lang.String channelId, long selfUid, java.lang.String customInfo, boolean offlineEnable)
ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS
ResponseCode.RES_JOIN_CHANNEL_UID_CONFLICT
ResponseCode.RES_CHANNEL_MEMBER_EXCEED
ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS_OTHER_CLIENT
channelId
- channel IDselfUid
- User ID of the current user, optional. The value must be greater than 0. If the uid becomes invalid, the server will assign a random and unique uid. You can also generate a unique uid.customInfo
- custome info tranferred in a pass-through mode.offlineEnabled
- Offline notificationInvocationFuture<java.lang.Void> leave(java.lang.String channelId, boolean offlineEnable, java.lang.String customInfo)
ResponseCode.RES_CHANNEL_MEMBER_NOT_EXISTS
channelId
- channel IDofflineEnabled
- Offline notificationcustomInfo
- custome info tranferred in a pass-through mode.InvocationFuture<java.lang.Void> invite(InviteParamBuilder paramBuilder)
ResponseCode.RES_PEER_NIM_OFFLINE
ResponseCode.RES_PEER_PUSH_OFFLINE
ResponseCode.RES_CHANNEL_NOT_EXISTS
ResponseCode.RES_CHANNEL_MEMBER_NOT_EXISTS
ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS
ResponseCode.RES_CHANNEL_MEMBER_EXCEED
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
paramBuilder
- InviteParamBuilder InviteParamBuilder
InvocationFuture<java.lang.Void> cancelInvite(InviteParamBuilder paramBuilder)
ResponseCode.RES_CHANNEL_NOT_EXISTS
ResponseCode.RES_CHANNEL_NOT_EXISTS
ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS
ResponseCode.RES_INVITE_HAS_ACCEPT
paramBuilder
- InviteParamBuilder InviteParamBuilder
InvocationFuture<java.lang.Void> rejectInvite(InviteParamBuilder paramBuilder)
ResponseCode.RES_PEER_NIM_OFFLINE
ResponseCode.RES_CHANNEL_NOT_EXISTS
ResponseCode.RES_CHANNEL_NOT_EXISTS
ResponseCode.RES_INVITE_HAS_REJECT
ResponseCode.RES_INVITE_HAS_ACCEPT
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
paramBuilder
- InviteParamBuilder InviteParamBuilder
InvocationFuture<java.lang.Void> acceptInvite(InviteParamBuilder paramBuilder)
acceptInviteAndJoin(InviteParamBuilder, long)
ResponseCode.RES_PEER_NIM_OFFLINE
ResponseCode.RES_CHANNEL_NOT_EXISTS
ResponseCode.RES_CHANNEL_NOT_EXISTS
ResponseCode.RES_INVITE_HAS_REJECT
ResponseCode.RES_INVITE_HAS_ACCEPT
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
paramBuilder
- InviteParamBuilder InviteParamBuilder
InvocationFuture<ChannelFullInfo> acceptInviteAndJoin(InviteParamBuilder paramBuilder, long selfUid)
ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS_OTHER_CLIENT
ResponseCode.RES_PEER_NIM_OFFLINE
ResponseCode.RES_CHANNEL_NOT_EXISTS
ResponseCode.RES_CHANNEL_MEMBER_HAS_EXISTS
ResponseCode.RES_INVITE_NOT_EXISTS
ResponseCode.RES_INVITE_HAS_REJECT
ResponseCode.RES_INVITE_HAS_ACCEPT
ResponseCode.RES_JOIN_CHANNEL_UID_CONFLICT
ResponseCode.RES_CHANNEL_MEMBER_EXCEED
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
paramBuilder
- InviteParamBuilder InviteParamBuilder
selfUid
- User ID of the current user, optional. The value must be greater than 0. If the uid becomes invalid, the server will assign a random and unique uid. You can also generate a unique uid.InvocationFuture<java.lang.Void> sendControl(java.lang.String channelId, java.lang.String accountId, java.lang.String customInfo)
ResponseCode.RES_PEER_NIM_OFFLINE
ResponseCode.RES_CHANNEL_NOT_EXISTS
ResponseCode.RES_CHANNEL_MEMBER_NOT_EXISTS
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
channelId
- channel idaccountId
- peer accid. If unspecified, all members are notifiedcustomInfo
- custome info tranferred in a pass-through mode.InvocationFuture<ChannelFullInfo> call(CallParamBuilder callParamBuilder)
ResponseCode.RES_PEER_NIM_OFFLINE
ResponseCode.RES_PEER_PUSH_OFFLINE
ResponseCode.RES_CHANNEL_HAS_EXISTS
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
callParamBuilder
- CallParamBuilder CallParamBuilder
InvocationFuture<ChannelBaseInfo> queryChannelInfo(java.lang.String channelName)
ResponseCode.RES_CHANNEL_NOT_EXISTS
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
channelName
- InvocationFuture<ChannelFullInfo> queryChannelFullInfo(java.lang.String channelName)
ResponseCode.RES_CHANNEL_NOT_EXISTS
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
channelName
- InvocationFuture<java.lang.Integer> queryChannelMemberCount(java.lang.String channelName)
ResponseCode.RES_CHANNEL_NOT_EXISTS
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
channelName
- InvocationFuture<java.util.List<MemberInfo>> queryChannelMemberList(java.lang.String channelName)
ResponseCode.RES_CHANNEL_NOT_EXISTS
Note: We recommend that you set the callback to RequestCallbackWrapper
and handle the business logic based on the returned code. If the code returned is equal to 200, the callback succeeds
If you use RequestCallback
, the error code is returned by RequestCallback.onFailed(int code)
.
channelName
-