All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.dip.MethodCallSupport

java.lang.Object
   |
   +----com.ibm.beans.dip.MethodCallSupport

public class MethodCallSupport
extends Object
implements Serializable
This utility class can be used by beans that support bound 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.


Constructor Index

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

Method Index

 o addMethodCallListener(MethodCallListener)
Adds a MethodCallListener instance to the listener list.
 o elements()
Gets an enumeration of MethodCallListener instances.
 o fireMethodCall(String, Object[])
Reports a bound method call to any registered listeners.
 o isEmpty()
Checks to see if the collection is empty.
 o removeMethodCallListener(MethodCallListener)
Removes a MethodCallListener instance from the listener list.

Constructors

 o MethodCallSupport
 public MethodCallSupport(Object sourceBean)
Constructs a MethodCallSupport instance using the default Vector implementation.

Parameters:
sourceBean - The bean given as the source for any event.
 o MethodCallSupport
 public MethodCallSupport(Object sourceBean,
                          Collection collection)
Constructs a MethodCallSupport instance using the input Collection.

Parameters:
sourceBean - The bean given as the source for any event.
collection - The Collection used to store the listeners.

Methods

 o addMethodCallListener
 public synchronized void addMethodCallListener(MethodCallListener listener)
Adds a MethodCallListener instance to the listener list.

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

Parameters:
listener - The listener to remove.
 o fireMethodCall
 public void fireMethodCall(String methodID,
                            Object args[])
Reports a bound method call to any registered listeners.

Parameters:
methodId - The unique string identifying the called method.
args - The arguments passed to the called method.
 o elements
 public final synchronized Enumeration elements()
Gets an enumeration of MethodCallListener 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 fireMethodCall() method.
 o isEmpty
 public final boolean isEmpty()
Checks to see if the collection is empty.

Returns:
true if empty; false otherwise.

All Packages  Class Hierarchy  This Package  Previous  Next  Index