Lines Matching refs:LastActivity
33 import org.jivesoftware.smackx.packet.LastActivity;
37 * associated with a Jabber ID. A manager handles incoming LastActivity requests
42 * LastActivity (XEP-0012) based on the sending JID's type allows for retrieval
53 * the LastActivity packet to them, as in the following code:
59 * LastActivity activity = LastActivity.getLastActivity(con, "xray@jabber.org/Smack");
66 * LastActivity activity = LastActivity.getLastActivity(con, "xray@jabber.org");
69 * To get the uptime of a host, you simple send the LastActivity packet to it,
74 * LastActivity activity = LastActivity.getLastActivity(con, "jabber.org");
88 // Enable the LastActivity support on every established connection
136 LastActivity message = new LastActivity();
146 }, new AndFilter(new IQTypeFilter(IQ.Type.GET), new PacketTypeFilter(LastActivity.class)));
147 ServiceDiscoveryManager.getInstanceFor(connection).addFeature(LastActivity.NAMESPACE);
189 * @return the LastActivity packet of the jid.
193 public static LastActivity getLastActivity(Connection con, String jid) throws XMPPException {
194 LastActivity activity = new LastActivity();
200 LastActivity response = (LastActivity) collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
224 return result.containsFeature(LastActivity.NAMESPACE);