* Add a PacketListener for all TimedActivityDataObject packets
*/
receiver.addPacketListener(new PacketListener() {
public void processPacket(Packet packet) {
try {
TimedActivities payload = provider.getPayload(packet);
if (payload == null) {
log.warn("Invalid ActivitiesExtensionPacket"
+ " does not contain a payload: " + packet);
return;
}
JID from = new JID(packet.getFrom());
List<TimedActivityDataObject> timedActivities = payload
.getTimedActivities();
if (!ObjectUtils.equals(sessionID.getValue(),
payload.getSessionID())) {
log.warn("Rcvd ("
+ String.format("%03d", timedActivities.size())
+ ") " + Utils.prefix(from)
+ "from an old/unknown session: " + timedActivities);
return;