|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.verifier.event.EventGeneratorSupport
public abstract class EventGeneratorSupport
Support class for objects implementing the
EventGenerator
interface.
Contains implementations for addListener, removeListener, and hasListeners.
Every effort has been made to try to achieve thread-safety in EventGeneratorSupport class. Of course, this doesn't mean nasty race conditions and dead locks don't exist. I'm just not aware of them :)
For more detailed documentation, refer to the Util Library Tutorial and Util Library Specifications . See Also: The Event Generator Idiom by Bill Venners.
org.gjt.lindfors.util.EventGenerator
,
Serialized FormConstructor Summary | |
---|---|
EventGeneratorSupport()
Constructs support object. |
Method Summary | |
---|---|
protected void |
addListener(EventListener listener)
Registers a new listener to this object. |
Object |
clone()
[PENDING] |
protected Enumeration |
getListeners()
Returns the listeners registered to this object. |
boolean |
hasListeners()
Checks if any registered listeners exist. |
protected void |
removeListener(EventListener listener)
Unregisters a listener from this object. |
Component |
toComponent()
[PENDING] |
String |
toString()
Returns a string representation of this EventGeneratorSupport object. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventGeneratorSupport()
Method Detail |
---|
public boolean hasListeners()
protected Enumeration getListeners()
protected void addListener(EventListener listener)
This method is marked as protected and is supposed to be used only by the concrete implementations of generator support classes. The concrete subclasses must ensure only the correct type of listeners are allowed to register, as this method allows any listener to be added, therefore not being type safe.
listener
- the listener objectprotected void removeListener(EventListener listener)
listener
- the listener objectpublic String toString()
The output will be similar to the following form:
EventGeneratorSupport[Registered Listeners=1]
toString
in class Object
public Component toComponent()
public Object clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |