All Packages Class Hierarchy This Package Previous Next Index
This doesn't extend EventObject so there is no source. This is deliberate, since if the event listener uses the source for anything tight coupling is introduced. If the need arises to pass the source, use a property or change the design.
The implementation should have a no-arg constructor and a constructor that sets the name.
public abstract void setName(String name)
Note the name must not only semantically describe the Message, but must be unique among all the other Messages in the portion of a system the Message will be used in. When coding names be very careful to avoid spelin mistakkes. :-) The name is case sensitive.
Due to String interning, do NOT use new String("ThisName") to create event names. This may cause Hashtable to fail and is wasteful.
public abstract String getName()
public abstract void reuse(String name)
setName()
and a removeAll() in a slightly faster manner
than two separate method calls. In future versions it may do more.
All Packages Class Hierarchy This Package Previous Next Index