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.


Constructor Index

 o VetoableEventSupport(Object)
Constructs a VetoableEventSupport instance using the default Vector implementation.
 o VetoableEventSupport(Object, Collection)
Constructs a VetoableEventSupport instance using the input Collection.

Method Index

 o addVetoableEventListener(VetoableEventListener)
Adds a VetoableEventListener instance to the listener list.
 o elements()
Gets an enumeration of VetoableEventListener instances.
 o fireVetoableEvent(String)
Reports a vetoable event notification call to any registered listeners.
 o isEmpty()
Checks to see if the collection of listeners is empty.
 o removeVetoableEventListener(VetoableEventListener)
Removes a VetoableEventListener instance from the listener list.

Constructors

 o 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.
 o 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.

Methods

 o addVetoableEventListener
 public synchronized void addVetoableEventListener(VetoableEventListener listener)
Adds a VetoableEventListener instance to the listener list.

Parameters:
listener - The listener to add.
 o removeVetoableEventListener
 public synchronized void removeVetoableEventListener(VetoableEventListener listener)
Removes a VetoableEventListener instance from the listener list.

Parameters:
listener - The listener to remove.
 o 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.
 o 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.
 o 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