All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.script.SCRBaseEventListener
java.lang.Object
|
+----com.ibm.beans.script.SCRBaseEventListener
- public class SCRBaseEventListener
- extends Object
The base event listener class.
This is a superclass of all the listener classes generated by the
scripting event processor. An instance of this class maintains a
Vector of all the beans it listens to for a particular event interface.
It adds itself as a listener to a bean before the script starts running
and removes itself from the listener list after the script execution is
terminated.
-
eventProcessor
- Indicates the scripting event processor.
-
SCRBaseEventListener()
- Creates and initializes a SCRBaseEventListener instance.
-
connectSource(Object)
- Adds an instance of BaseEventListener (or its
subclass) as a listener for a particular event fired by a bean.
-
disconnectSource()
- Removes the event listener from all the beans to which it listens.
-
eventFired(String, Object[], String[], Object[])
- Notifies event listeners when
an event is fired by an event source.
-
eventFiredThrowsClause(String, Object[], String[], Object[])
- Notifies event listeners when an event is fired by an event source.
-
getInterfaceName()
- Gets the name of the listener interface.
-
setAddMethodName(String)
- Sets the name of the addListener() method.
-
setEventProcessor(SCREventProcessor)
- Sets the scripting event processor.
-
setInterfaceName(String)
- Sets the name of the listener interface.
-
setRemoveMethodName(String)
- Sets the name of removeListener() method.
eventProcessor
protected SCREventProcessor eventProcessor
- Indicates the scripting event processor.
SCRBaseEventListener
public SCRBaseEventListener()
- Creates and initializes a SCRBaseEventListener instance.
setEventProcessor
public void setEventProcessor(SCREventProcessor eventProc)
- Sets the scripting event processor.
- Parameters:
- eventProc - The scripting event processor.
setAddMethodName
public void setAddMethodName(String name)
- Sets the name of the addListener() method.
The addListener() method is used to connect the listener to the event source.
- Parameters:
- name - The name of the addListener() method.
setRemoveMethodName
public void setRemoveMethodName(String name)
- Sets the name of removeListener() method.
The removeListener() method is used to disconnect the listener
from the event source.
- Parameters:
- name - The name of removeListener() method.
setInterfaceName
public void setInterfaceName(String name)
- Sets the name of the listener interface.
- Parameters:
- name - The name of the interface.
getInterfaceName
public String getInterfaceName()
- Gets the name of the listener interface.
- Returns:
- name - The name of the interface.
connectSource
public void connectSource(Object object)
- Adds an instance of BaseEventListener (or its
subclass) as a listener for a particular event fired by a bean.
This method is called before the script execution begins.
- Parameters:
- object - The bean that can fire an event.
disconnectSource
public void disconnectSource()
- Removes the event listener from all the beans to which it listens.
This method is called when the script execution is terminated.
eventFired
protected void eventFired(String eventName,
Object args[],
String arg_classes[],
Object ret[])
- Notifies event listeners when
an event is fired by an event source. The listener forwards the event to the
scripting component.
- Parameters:
- eventName -
- The name of the event which corresponds to
the function to be invoked in the script.
- args - An array of actual parameters.
- arg_classes - An array of class names of actual parameters.
- ret - An array of objects returned by the scripting component.
eventFiredThrowsClause
protected Throwable eventFiredThrowsClause(String eventName,
Object args[],
String arg_classes[],
Object ret[])
- Notifies event listeners when an event is fired by an event source.
The event handler code in the event listener may throw an exception
which is returned to the event source.
The listener forwards the event to the scripting component.
- Parameters:
- eventName -
- The name of the event which corresponds to
the function to be invoked in the script.
- args - An array of actual parameters.
- arg_classes - An array of class names of actual parameters.
- ret - An array of objects returned by the scripting component.
- Returns:
- The exception thrown by the event handler.
All Packages Class Hierarchy This Package Previous Next Index