|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ou.kmi.buddyspace.core.BSPresencesOfJID
BSPresencesOfJID
contains presence information
about all resources the given JID
is logged from.
It includes list BSPresenceInfo
records.
Field Summary | |
protected JID |
jid
|
protected java.util.Hashtable |
presences
|
Constructor Summary | |
BSPresencesOfJID(Presence p)
Constructs BSPresencesOfJID from Presence
packet. |
Method Summary | |
void |
changePresence(Presence p)
Changes presence of JID according to given Presence
packet. |
java.util.Enumeration |
getAllPresences()
Returns Enumeration of all BSPresenceInfo s
which are available. |
BSPresenceInfo |
getBestPresence()
Returns the "most online" BSPresenceInfo . |
static BSPresenceInfo |
getBetterPresence(BSPresenceInfo p1,
BSPresenceInfo p2)
Compares the given presences and returns the one "more online". |
BSPresenceInfo |
getJIDPresence(JID jid)
Returns BSPresenceInfo of JID. |
boolean |
isAvailable()
Returns true if the JID is available at least from one
resource. |
protected void |
setPresence(Presence p)
Sets presence according to given Presence packet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Hashtable presences
protected JID jid
Constructor Detail |
public BSPresencesOfJID(Presence p)
BSPresencesOfJID
from Presence
packet.
Method Detail |
public void changePresence(Presence p)
JID
according to given Presence
packet.
protected void setPresence(Presence p)
Presence
packet.
This is internal function and doesn't test JID,...
public boolean isAvailable()
JID
is available at least from one
resource. It means if the hashtable is not empty.
public BSPresenceInfo getBestPresence()
BSPresenceInfo
.
public static BSPresenceInfo getBetterPresence(BSPresenceInfo p1, BSPresenceInfo p2)
public BSPresenceInfo getJIDPresence(JID jid)
BSPresenceInfo
of JID. If the JID has resource,
returns presence for the resource. Otherwise returns the best presence.
public java.util.Enumeration getAllPresences()
Enumeration
of all BSPresenceInfo
s
which are available. If the JID is not available, returns null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |