All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.dip.VetoableEventSupport
java.lang.Object
|
+----com.ibm.beans.dip.VetoableEventSupport
- public class VetoableEventSupport
- extends Object
- implements Serializable
This utility class can be used by beans that support constrained
events. You can inherit from this class or use
an instance of this class as a member field of your bean.
Once inherited or instantiated, you can delegate work to this bean.
-
VetoableEventSupport(Object)
- Constructs a VetoableEventSupport instance using the default Vector
implementation.
-
VetoableEventSupport(Object, Collection)
- Constructs a VetoableEventSupport instance using the input Collection.
-
addVetoableEventListener(VetoableEventListener)
- Adds a VetoableEventListener instance to the listener list.
-
elements()
- Gets an enumeration of VetoableEventListener instances.
-
fireVetoableEvent(String)
- Reports a vetoable event notification call to any registered listeners.
-
isEmpty()
- Checks to see if the collection of listeners is empty.
-
removeVetoableEventListener(VetoableEventListener)
- Removes a VetoableEventListener instance from the listener list.
VetoableEventSupport
public VetoableEventSupport(Object sourceBean)
- Constructs a VetoableEventSupport instance using the default Vector
implementation.
- Parameters:
- sourceBean - The bean given as the source for any event.
VetoableEventSupport
public VetoableEventSupport(Object sourceBean,
Collection collection)
- Constructs a VetoableEventSupport instance using the input Collection.
- Parameters:
- sourceBean - The bean given as the source for any event.
- collection - The type of Collection used to store the
listeners.
addVetoableEventListener
public synchronized void addVetoableEventListener(VetoableEventListener listener)
- Adds a VetoableEventListener instance to the listener list.
- Parameters:
- listener - The listener to add.
removeVetoableEventListener
public synchronized void removeVetoableEventListener(VetoableEventListener listener)
- Removes a VetoableEventListener instance from the listener list.
- Parameters:
- listener - The listener to remove.
fireVetoableEvent
public void fireVetoableEvent(String eventSetName) throws EventVetoException
- Reports a vetoable event notification call to any registered listeners.
If anyone vetos the notification, then this method fires a new event
preventing the original notification operation.
- Parameters:
- eventSetName - The event set name of the event
whose notification method was called.
- Throws: EventVetoException
- May be thown if the listener
wants the event firing to be canceled.
elements
public final synchronized Enumeration elements()
- Gets an enumeration of VetoableEventListener instances.
Use the Enumeration methods on
the returned object to fetch the elements sequentially.
- Returns:
- An enumeration of the listeners that will be fired in
the fireVetoableEvent() method.
isEmpty
public final boolean isEmpty()
- Checks to see if the collection of listeners is empty.
- Returns:
-
true
if empty; false
otherwise.
All Packages Class Hierarchy This Package Previous Next Index