com.valhalla.jbother.jabber.smack
Class PresencePacketListener

java.lang.Object
  extended bycom.valhalla.jbother.jabber.smack.PresencePacketListener
All Implemented Interfaces:
org.jivesoftware.smack.PacketListener

public class PresencePacketListener
extends java.lang.Object
implements org.jivesoftware.smack.PacketListener

This class listens to all presence packets, and delivers them according to their type, etc...

Version:
1.0
Author:
Adam Olsen

Constructor Summary
PresencePacketListener()
           
 
Method Summary
 void performPresenceTasks(BuddyStatus buddy, org.jivesoftware.smack.packet.Presence.Type type)
          Performs presence tasks, like playing sounds when a buddy signs on or off or displaying that they have done so in their conversation window if it exists
 void processPacket(org.jivesoftware.smack.packet.Packet packet)
          Called when a Presence packet is recieved
 void requestSubscription(java.lang.String userId)
          If someone sends a subscription request packet, the user will be asked if they want to accept the request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresencePacketListener

public PresencePacketListener()
Method Detail

processPacket

public void processPacket(org.jivesoftware.smack.packet.Packet packet)
Called when a Presence packet is recieved

Specified by:
processPacket in interface org.jivesoftware.smack.PacketListener

performPresenceTasks

public void performPresenceTasks(BuddyStatus buddy,
                                 org.jivesoftware.smack.packet.Presence.Type type)
Performs presence tasks, like playing sounds when a buddy signs on or off or displaying that they have done so in their conversation window if it exists

Parameters:
buddy - the buddy to process
type - the presence type

requestSubscription

public void requestSubscription(java.lang.String userId)
If someone sends a subscription request packet, the user will be asked if they want to accept the request

Parameters:
userId - the requesting user