1 11 12 package org.jivesoftware.messenger; 13 14 import org.jivesoftware.messenger.user.User; 15 import org.jivesoftware.messenger.user.UserNotFoundException; 16 import org.jivesoftware.messenger.auth.UnauthorizedException; 17 import org.xmpp.packet.Presence; 18 import org.xmpp.packet.JID; 19 20 import java.util.Collection ; 21 22 30 public interface PresenceManager { 31 32 35 public static final int SORT_USERNAME = 0; 36 37 40 public static final int SORT_ONLINE_TIME = 1; 41 42 48 public boolean isAvailable(User user); 49 50 58 public Presence getPresence(User user); 59 60 66 public Collection <Presence> getPresences(String username); 67 68 74 public void probePresence(JID prober, JID probee); 75 76 84 public void handleProbe(Presence packet) throws UnauthorizedException; 85 86 95 public boolean canProbePresence(JID prober, String probee) throws UserNotFoundException; 96 97 106 public void sendUnavailableFromSessions(JID recipientJID, JID userJID); 107 108 113 public void userAvailable(Presence presence); 114 115 120 public void userUnavailable(Presence presence); 121 122 130 public String getLastPresenceStatus(User user); 131 132 140 public long getLastActivity(User user); 141 } | Popular Tags |