com.objectwave.event
Class SimplePacketSupport

java.lang.Object
  |
  +--com.objectwave.event.SimplePacketSupport

public class SimplePacketSupport
extends java.lang.Object

This class facilitates the use of Event handling. To use this class requires a couple of steps. First, the using class must implement the Dispatcher interface. This is how the event is actually delivered. Next, a reference to this class must be placed in the using class. Third, the using class needs to add the addListener and removeListener methods. This, hopefully, makes it real easy to add event handling to a class. This uses the DoulbeDispatch pattern to achieve event dispatching. NOTE: Events will NOT be sent to the originator of the event.

Version:
2.0

Constructor Summary
SimplePacketSupport(Dispatcher source)
           
 
Method Summary
 void addEventListener(java.util.EventListener item)
           
 void addPacketListener(java.util.EventListener item)
          Deprecated.  
 void fireEvent(java.util.EventObject evt)
          Thread safe dispatching of an event.
 Dispatcher getSource()
           
 void removeEventListener(java.util.EventListener item)
           
 void removePacketListener(java.util.EventListener item)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePacketSupport

public SimplePacketSupport(Dispatcher source)
Method Detail

addPacketListener

public void addPacketListener(java.util.EventListener item)
Deprecated.  


addEventListener

public void addEventListener(java.util.EventListener item)

fireEvent

public void fireEvent(java.util.EventObject evt)
Thread safe dispatching of an event.


getSource

public Dispatcher getSource()

removePacketListener

public void removePacketListener(java.util.EventListener item)
Deprecated.  


removeEventListener

public void removeEventListener(java.util.EventListener item)