Package com.smartfoxserver.v2.buddylist
Interface BuddyList
-
- All Known Implementing Classes:
SFSBuddyList
public interface BuddyList
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Buddy
addBuddy(Buddy buddy)
Used by the BuddyManager only.void
clearAll()
boolean
containsBuddy(java.lang.String buddyName)
Checks if a Buddy is contained in the BuddyListjava.util.List<Buddy>
getBuddies()
Get a list of all Buddies in the BuddyListBuddy
getBuddy(java.lang.String buddyName)
Get a Buddy from the BuddyList by nameBuddyListManager
getBuddyListManager()
Get a reference to the BuddyManager managing this BuddyListUser
getOwner()
Get the User that owns this BuddyListjava.lang.String
getOwnerName()
Get the name of the owner of this BuddyListint
getRuntimeSize()
Obtain the size of the BuddyList, including the temp buddiesint
getSize()
Obtain the size of the BuddyList.boolean
isBuddyBlocked(java.lang.String buddyName)
Checks whether the specified Buddy is blocked in this BuddyListboolean
isEmpty()
Checks if the BuddyList is emptyboolean
isFull()
Checks if the BuddyList is fullBuddy
removeBuddy(java.lang.String buddyName)
Used by the BuddyManager only.void
setBuddyListManager(BuddyListManager buddyListManager)
ISFSArray
toSFSArray()
-
-
-
Method Detail
-
getOwnerName
java.lang.String getOwnerName()
Get the name of the owner of this BuddyList- Returns:
- the owner's name
-
getOwner
User getOwner()
Get the User that owns this BuddyList- Returns:
- the BuddyList owner
-
getBuddyListManager
BuddyListManager getBuddyListManager()
Get a reference to the BuddyManager managing this BuddyList- Returns:
- a the BuddyManager
-
setBuddyListManager
void setBuddyListManager(BuddyListManager buddyListManager)
-
getBuddy
Buddy getBuddy(java.lang.String buddyName)
Get a Buddy from the BuddyList by name- Parameters:
buddyName
- the name of the Buddy- Returns:
- the Buddy object or null if no Buddy exists with that name
-
getBuddies
java.util.List<Buddy> getBuddies()
Get a list of all Buddies in the BuddyList- Returns:
- all the Buddy objects in the BuddyList
-
addBuddy
Buddy addBuddy(Buddy buddy) throws SFSBuddyListException
Used by the BuddyManager only.
If you want to add a Buddy to User's list please use the BuddyAPI
-
removeBuddy
Buddy removeBuddy(java.lang.String buddyName)
Used by the BuddyManager only.
If you want to remove a Buddy from the User's list please use the BuddyAPI.
-
containsBuddy
boolean containsBuddy(java.lang.String buddyName)
Checks if a Buddy is contained in the BuddyList- Parameters:
buddyName
- the Buddy name- Returns:
- true if the list contains a Buddy with the provided name
-
getSize
int getSize()
Obtain the size of the BuddyList. The returned value does not count the temporary Buddies- Returns:
- the size of the BuddyList without counting the temporary Buddies
-
getRuntimeSize
int getRuntimeSize()
Obtain the size of the BuddyList, including the temp buddies- Returns:
- the size of the BuddyList
-
isFull
boolean isFull()
Checks if the BuddyList is full- Returns:
- true if the BuddyList is full
-
isEmpty
boolean isEmpty()
Checks if the BuddyList is empty- Returns:
- true if the BuddyList is empty
-
isBuddyBlocked
boolean isBuddyBlocked(java.lang.String buddyName)
Checks whether the specified Buddy is blocked in this BuddyList- Parameters:
buddyName
- the name of the Buddy- Returns:
- true if the Buddy is blocked
-
clearAll
void clearAll()
-
toSFSArray
ISFSArray toSFSArray()
-
-