public interface CarrierHandler extends GroupHandler
| Modifier and Type | Method and Description |
|---|---|
void |
onConnection(Carrier carrier,
ConnectionStatus status)
The callback function to process the self connection status.
|
void |
onFriendAdded(Carrier carrier,
FriendInfo friendInfo)
The callback function to process the new friend added event.
|
void |
onFriendConnection(Carrier carrier,
java.lang.String friendId,
ConnectionStatus status)
The callback function to process the friend connections status changed event.
|
void |
onFriendInfoChanged(Carrier carrier,
java.lang.String friendId,
FriendInfo info)
The callback function to process the friend information changed event.
|
void |
onFriendInviteRequest(Carrier carrier,
java.lang.String from,
java.lang.String data)
The callback function to process the friend invite request.
|
void |
onFriendMessage(Carrier carrier,
java.lang.String from,
byte[] message,
java.util.Date timestamp,
boolean isOffline)
The callback function to process the friend message.
|
void |
onFriendPresence(Carrier carrier,
java.lang.String friendId,
PresenceStatus presence)
The callback function to process the friend presence changed event.
|
void |
onFriendRemoved(Carrier carrier,
java.lang.String friendId)
The callback function to process the friend removed event.
|
void |
onFriendRequest(Carrier carrier,
java.lang.String userId,
UserInfo info,
java.lang.String hello)
The callback function to process the friend request.
|
void |
onFriends(Carrier carrier,
java.util.List<FriendInfo> friends)
The callback function to iterate the each friend item in friend list.
|
void |
onGroupInvite(Carrier carrier,
java.lang.String from,
byte[] cookie)
The callback function to process the group invite request.
|
void |
onIdle(Carrier carrier)
The callback function that perform idle work.
|
void |
onReady(Carrier carrier)
The callback function to process the ready notification.
|
void |
onSelfInfoChanged(Carrier carrier,
UserInfo userInfo)
The callback function to process the self info changed event.
|
onGroupConnected, onGroupMessage, onGroupTitle, onPeerListChanged, onPeerNamevoid onIdle(Carrier carrier)
carrier - Carrier node instancevoid onConnection(Carrier carrier, ConnectionStatus status)
carrier - Carrier node instancestatus - Current connection status. @see ConnectionStatusvoid onReady(Carrier carrier)
carrier - Carrier node instancevoid onSelfInfoChanged(Carrier carrier, UserInfo userInfo)
carrier - Carrier node instanceuserInfo - The updated user informationvoid onFriends(Carrier carrier, java.util.List<FriendInfo> friends)
carrier - Carrier node instancefriends - The friends list.void onFriendConnection(Carrier carrier, java.lang.String friendId, ConnectionStatus status)
carrier - carrier node instance.friendId - The friend's user id.status - The connection status of friend. @see ConnectionStatusvoid onFriendInfoChanged(Carrier carrier, java.lang.String friendId, FriendInfo info)
carrier - Carrier node instancefriendId - The friend's user idinfo - The update friend informationvoid onFriendPresence(Carrier carrier, java.lang.String friendId, PresenceStatus presence)
carrier - Carrier node instancefriendId - The friend's user idpresence - The presence status of the friendvoid onFriendRequest(Carrier carrier, java.lang.String userId, UserInfo info, java.lang.String hello)
carrier - Carrier node instanceuserId - The user id who want be friend with current userinfo - The user information to `userId`hello - The PIN for target user, or any application defined contentvoid onFriendAdded(Carrier carrier, FriendInfo friendInfo)
carrier - Carrier node instancefriendInfo - The added friend's informationvoid onFriendRemoved(Carrier carrier, java.lang.String friendId)
carrier - Carrier node instancefriendId - The friend's user idvoid onFriendMessage(Carrier carrier, java.lang.String from, byte[] message, java.util.Date timestamp, boolean isOffline)
carrier - Carrier node instancefrom - The id from who send the messagemessage - The message contenttimestamp - The message sent time as the number of miliseconds
since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)isOffline - The boolean value means this message is received as offline message
or online message. The vlaue of true means the message is received
as offline message, otherwise as online message.void onFriendInviteRequest(Carrier carrier, java.lang.String from, java.lang.String data)
carrier - Carrier node instancefrom - The user id from who send the invite requestdata - The application defined data sent from friendvoid onGroupInvite(Carrier carrier, java.lang.String from, byte[] cookie)
carrier - Carrier node instancefrom - The user id from who send the invite requestcookie - The application defined cookie send from friend