All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface sunw.demo.encapsulatedEvents.EncapsulatedEventManager

public interface EncapsulatedEventManager

Containers or other "manager"-like objects wishing to offer an encapsulated event stream from its "set" of containees or "managed" objects, should implement this interface to expose this facility.

Arbitrary objects wishing to observe the event stream from a particular event source, should locate that event sources EncapsulatedEventManager and use this interface on that instance to obtain such an event stream.

See Also:
also, also, also

Method Index

 o addEncapsulatedEventListener(Object, EncapsulatedEventListener)

Adds the listener eel to the source s to receive ALL events s emits as encpasulated events.

 o addEncapsulatedEventListener(Object, EncapsulatedEventListener, Class[])

Adds the listener eel to the source s to receive the events enumerated by lc that s emits.

 o getSourceEventListenerInterfaces(Object)

Called to determine the events that a particular source emits.

 o removeEncapsulatedEventListener(Object, EncapsulatedEventListener)

Removes the listener eel from the source s, thus unregistering eel from receiving encapsulated events for all the events that s emits.

 o removeEncapsulatedEventListener(Object, EncapsulatedEventListener, Class[])

Removes the listener eel from the source s, thus unregistering for encapsulated events from s enumerated by lc.

Methods

 o getSourceEventListenerInterfaces
 public abstract Class[] getSourceEventListenerInterfaces(Object s)

Called to determine the events that a particular source emits. Will throw IllegalArgumentException if s is not managed by this EncapsulatedEventManager.

Parameters:
s - the event source
Returns:
list of java.util.EventListener sub-interfaces that s sources or null.
 o addEncapsulatedEventListener
 public abstract void addEncapsulatedEventListener(Object s,
                                                   EncapsulatedEventListener eel)

Adds the listener eel to the source s to receive ALL events s emits as encpasulated events. Will throw IllegalArgumentException if s is not managed by this EncapsulatedEventManager.

Parameters:
s - the event source
eel - the listener
 o removeEncapsulatedEventListener
 public abstract void removeEncapsulatedEventListener(Object s,
                                                      EncapsulatedEventListener eel)

Removes the listener eel from the source s, thus unregistering eel from receiving encapsulated events for all the events that s emits. Will throw IllegalArgumentException if s is not managed by this EncapsulatedEventManager.

Parameters:
s - the event source
eel - the listener
 o addEncapsulatedEventListener
 public abstract void addEncapsulatedEventListener(Object s,
                                                   EncapsulatedEventListener eel,
                                                   Class lc[])

Adds the listener eel to the source s to receive the events enumerated by lc that s emits. Will throw IllegalArgumentException if s is not managed by this EncapsulatedEventManager or if lc contains a reference to a Class that s does not emit events on.

Parameters:
s - the event source
eel - the listener
lc - the list of events to register the eel to receive.
 o removeEncapsulatedEventListener
 public abstract void removeEncapsulatedEventListener(Object s,
                                                      EncapsulatedEventListener eel,
                                                      Class lc[])

Removes the listener eel from the source s, thus unregistering for encapsulated events from s enumerated by lc. Will throw IllegalArgumentException if s is not managed by this EncapsulatedEventManager or if lc contains a reference to a Class that s does not emit events on.

Parameters:
s - the event source
eel - the listener
lc - the list of events to unregister the eel from receiving.

All Packages  Class Hierarchy  This Package  Previous  Next  Index