This class provides a simple eventing framework. Instances of this class represent discrete event types, and an occurrence of the event itself is manifested when the event instance is fired. Listeners may be added or removed from event instances to signal their interest in particular event types derived from this class.
Method Summary | ||
public void
|
addListener(listener, [cancelListener])
Adds a function as a listener to an event instance. |
|
public void
|
cancel()
Cancels the current firing of this event if this is a cancellable event. |
|
public string
|
getName()
Returns the name of this event. |
|
public boolean
|
isCancellable()
Returns whether or not the event instance is cancellable when the event is fired. |
|
public void
|
removeListener(listener)
Removes a listener function (and associated cancel listener function, if any) from an event instance. |
Method Detail |
public void addListener(listener, [cancelListener])
function listener
- The callback function to execute when this event is fired; not nullfunction [cancelListener]
- An optional listener to be invoked if the firing of this event is cancelled; this will be called
iff the listener with which it is associated has already been called, and is not the listener
responsible for cancelling the event (i.e. neither unfired listeners nor the listener that cancels
the event will have their cancel listeners invoked); note that the cancel listener will also
only ever be called if the event instance to which the cancel listener is added is, in fact,
cancellablepublic void cancel()
public string getName()
string
-
The name of this eventpublic boolean isCancellable()
boolean
-
True if the event instance is cancellablepublic void removeListener(listener)
function listener
- The listener function to be removed
Oracle Fusion Middleware Disc API Reference for Oracle WebLogic Portal
10g Release 3 (10.3.4)
E14257-04
Copyright © 2011, Oracle. All rights reserved.