public final class RosterEntry extends Manager
Modifier and Type | Method and Description |
---|---|
void |
cancelSubscription()
Cancel the presence subscription the XMPP entity representing this roster entry has with us.
|
boolean |
canSeeHisPresence()
Check if we are subscribed to the contact's presence.
|
boolean |
canSeeMyPresence()
Check if the contact is subscribed to "my" presence.
|
boolean |
equals(Object object) |
boolean |
equalsDeep(Object obj)
Indicates whether some other object is "equal to" this by comparing all members.
|
List<RosterGroup> |
getGroups()
Returns an copied list of the roster groups that this entry belongs to.
|
org.jxmpp.jid.BareJid |
getJid()
Returns the JID associated with this entry.
|
String |
getName()
Returns the name associated with this entry.
|
RosterPacket.ItemType |
getType()
Returns the roster subscription type of the entry.
|
String |
getUser()
Deprecated.
use
getJid() instead. |
int |
hashCode() |
boolean |
isApproved()
Returns the pre-approval state of this entry.
|
boolean |
isSubscriptionPending()
Returns the roster subscription request status of the entry.
|
void |
setName(String name)
Sets the name associated with this entry.
|
String |
toString() |
connection, getAuthenticatedConnectionOrThrow, schedule
@Deprecated public String getUser()
getJid()
instead.public org.jxmpp.jid.BareJid getJid()
public void setName(String name) throws SmackException.NotConnectedException, SmackException.NoResponseException, XMPPException.XMPPErrorException, InterruptedException
name
- the name.SmackException.NotConnectedException
XMPPException.XMPPErrorException
SmackException.NoResponseException
InterruptedException
public boolean isApproved()
public List<RosterGroup> getGroups()
public RosterPacket.ItemType getType()
getStatus()
to see if a subscription request
is pending.public boolean isSubscriptionPending()
true
, then the contact did not answer the subscription request
yet.public boolean canSeeMyPresence()
public boolean canSeeHisPresence()
true
then the contact has allowed us to
receive presence information.public void cancelSubscription() throws SmackException.NotConnectedException, InterruptedException
SmackException.NotConnectedException
InterruptedException
public boolean equalsDeep(Object obj)
The equals(Object)
method returns true
if the user JIDs are equal.
obj
- the reference object with which to compare.true
if this object is the same as the obj argument; false
otherwise.