org.jabber.jabberbeans
Class PacketEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--org.jabber.jabberbeans.PacketEvent
All Implemented Interfaces:
java.io.Serializable

public class PacketEvent
extends java.util.EventObject

A PacketEvent is an event occuring on a connection (from the ConnectionBean) describing an event occuring from a unit of data being sent or received.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PacketEvent(java.lang.Object source)
          construct an event with no packet.
PacketEvent(java.lang.Object source, Packet packet)
          construct an event with a Packet object.
 
Method Summary
 Packet getPacket()
          getPacket returns the packet which is the topic of this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PacketEvent

public PacketEvent(java.lang.Object source)
construct an event with no packet.

Parameters:
source - Source object which is broadcasting the event.

PacketEvent

public PacketEvent(java.lang.Object source,
                   Packet packet)
construct an event with a Packet object.

Parameters:
source - Source object which is broadcasting the event.
packet - Packet which this event is about
Method Detail

getPacket

public Packet getPacket()
getPacket returns the packet which is the topic of this event.

Returns:
a Packet value, or null if none provided.