# Interface: com.pnfsoftware.jeb.util.events.IEventSource

Interface for objects generating events, with optional relaying to a parent source.

## Method: addListener
- parameter: `listener`, type: `com.pnfsoftware.jeb.util.events.IEventListener`

Description: Register a listener. The listener is appended to the existing list of listeners. The implementor may allow duplicates.
parameter: listener: a listener of events generated by this source

## Method: countListeners
- return type: `int`

Description: Get the numbers of objects listening to this event source.
return: the number of listeners

## Method: getListeners
- return type: `java.util.List<? extends com.pnfsoftware.jeb.util.events.IEventListener>`

Description: Get a copy of the list of listeners.
return: 

## Method: getParentSource
- return type: `com.pnfsoftware.jeb.util.events.IEventSource`

Description: Get the parent source.
return: the parent source, or null if none

## Method: insertListener
- parameter: `index`, type: `int`
- parameter: `listener`, type: `com.pnfsoftware.jeb.util.events.IEventListener`

Description: Register a listener. The implementor may allow duplicates.
parameter: index: insertion point
parameter: listener: a listener of events generated by this source

## Method: notifyListeners
- parameter: `e`, type: `com.pnfsoftware.jeb.util.events.IEvent`

Description: Notify listeners that an event has occurred.
parameter: e: the event to be propagated

## Method: removeListener
- parameter: `listener`, type: `com.pnfsoftware.jeb.util.events.IEventListener`

Description: Unregister a listener. If the implementor allows duplicates in addListener\(\), it should deal with those consistently.
parameter: listener: the listener to be removed

## Method: setParentSource
- parameter: `parentSource`, type: `com.pnfsoftware.jeb.util.events.IEventSource`

Description: Set a parent source.
parameter: parentSource: the optional parent source

