All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.dip.VetoableMethodSupport
java.lang.Object
|
+----com.ibm.beans.dip.VetoableMethodSupport
- public class VetoableMethodSupport
- extends Object
- implements Serializable
This utility class can be used by beans that support constrained
methods. 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.
-
VetoableMethodSupport(Object)
- Constructs a VetoableMethodSupport instance using the default Vector
implementation.
-
VetoableMethodSupport(Object, Collection)
- Constructs a VetoableMethodSupport instance using the input Collection.
-
addVetoableMethodListener(VetoableMethodListener)
- Adds a VetoableMethodListener instance to the listener list.
-
elements()
- Gets an enumeration of VetoableMethodListener instances.
-
fireVetoableMethod(String, Object[])
- Reports a vetoable method call to any registered listeners.
-
isEmpty()
- Checks to see if the collection of listeners is empty.
-
removeVetoableMethodListener(VetoableMethodListener)
- Removes a VetoableMethodListener instance from the listener list.
VetoableMethodSupport
public VetoableMethodSupport(Object sourceBean)
- Constructs a VetoableMethodSupport instance using the default Vector
implementation.
- Parameters:
- sourceBean - The bean given as the source for any event.
VetoableMethodSupport
public VetoableMethodSupport(Object sourceBean,
Collection collection)
- Constructs a VetoableMethodSupport 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.
addVetoableMethodListener
public synchronized void addVetoableMethodListener(VetoableMethodListener listener)
- Adds a VetoableMethodListener instance to the listener list.
- Parameters:
- listener - The listener to add.
removeVetoableMethodListener
public synchronized void removeVetoableMethodListener(VetoableMethodListener listener)
- Removes a VetoableMethodListener instance from the listener list.
- Parameters:
- listener - The listener to remove.
fireVetoableMethod
public void fireVetoableMethod(String method,
Object args[]) throws MethodVetoException
- Reports a vetoable method call to any registered listeners. If
anyone vetos the method, then this method fires a new event
preventing the original method operation.
- Parameters:
- method - The unique string identifying the called method.
- args - The arguments passed to the called method.
- Throws: MethodVetoException
- May be thown if the listener
wants the method operation not to be performed.
elements
public final synchronized Enumeration elements()
- Gets an enumeration of VetoableMethodListener 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 fireVetoableMethod() 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