public abstract class AbstractCarrierHandler extends AbstractGroupHandler implements CarrierHandler
| Constructor and Description |
|---|
AbstractCarrierHandler() |
| 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 info)
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 info)
The callback function to process the self info changed event.
|
onGroupConnected, onGroupMessage, onGroupTitle, onPeerListChanged, onPeerNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonGroupConnected, onGroupMessage, onGroupTitle, onPeerListChanged, onPeerNamepublic void onIdle(Carrier carrier)
onIdle in interface CarrierHandlercarrier - Carrier node instancepublic void onConnection(Carrier carrier, ConnectionStatus status)
onConnection in interface CarrierHandlercarrier - Carrier node instancestatus - Current connection status. @see ConnectionStatuspublic void onReady(Carrier carrier)
onReady in interface CarrierHandlercarrier - Carrier node instancepublic void onSelfInfoChanged(Carrier carrier, UserInfo info)
onSelfInfoChanged in interface CarrierHandlercarrier - Carrier node instanceinfo - The updated user informationpublic void onFriends(Carrier carrier, java.util.List<FriendInfo> friends)
onFriends in interface CarrierHandlercarrier - Carrier node instancefriends - The friends list.public void onFriendConnection(Carrier carrier, java.lang.String friendId, ConnectionStatus status)
onFriendConnection in interface CarrierHandlercarrier - carrier node instance.friendId - The friend's user id.status - The connection status of friend. @see ConnectionStatuspublic void onFriendInfoChanged(Carrier carrier, java.lang.String friendId, FriendInfo info)
onFriendInfoChanged in interface CarrierHandlercarrier - Carrier node instancefriendId - The friend's user idinfo - The update friend informationpublic void onFriendPresence(Carrier carrier, java.lang.String friendId, PresenceStatus presence)
onFriendPresence in interface CarrierHandlercarrier - Carrier node instancefriendId - The friend's user idpresence - The presence status of the friendpublic void onFriendRequest(Carrier carrier, java.lang.String userId, UserInfo info, java.lang.String hello)
onFriendRequest in interface CarrierHandlercarrier - 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 contentpublic void onFriendAdded(Carrier carrier, FriendInfo info)
onFriendAdded in interface CarrierHandlercarrier - Carrier node instanceinfo - The added friend's informationpublic void onFriendRemoved(Carrier carrier, java.lang.String friendId)
onFriendRemoved in interface CarrierHandlercarrier - Carrier node instancefriendId - The friend's user idpublic void onFriendMessage(Carrier carrier, java.lang.String from, byte[] message, java.util.Date timestamp, boolean isOffline)
onFriendMessage in interface CarrierHandlercarrier - Carrier node instancefrom - The id(userid@nodeid) from who send the messagetimestamp - The message sent time as the number of seconds
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.message - The message contentpublic void onFriendInviteRequest(Carrier carrier, java.lang.String from, java.lang.String data)
onFriendInviteRequest in interface CarrierHandlercarrier - Carrier node instancefrom - The user id from who send the invite requestdata - The application defined data sent from friendpublic void onGroupInvite(Carrier carrier, java.lang.String from, byte[] cookie)
onGroupInvite in interface CarrierHandlercarrier - Carrier node instancefrom - The user id from who send the invite requestcookie - The application defined cookie send from friend