# Class: com.pnfsoftware.jeb.util.events.EventSource

Standard implementation for an event source.

## Constructor: EventSource

Description: Create an event source not attached to a parent source.

## Constructor: EventSource
- parameter: `parentSource`, type: `com.pnfsoftware.jeb.util.events.EventSource`

Description: Create an event source attached to an optional parent source. If present, events generated by this source will be propagated to its listeners **as well as the parent source's listeners**.
parameter: parentSource: optional parent source

## Static Field: onEventCallCount
Type: `java.util.concurrent.atomic.AtomicInteger`

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


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


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


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


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


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


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

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

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

Description: Notify listeners that an event has occurred.
parameter: e: the event to propagate
parameter: notifyParent: true to also propagate the event to the parent source, if any

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


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


## Static Method: relay
- parameter: `origin`, type: `com.pnfsoftware.jeb.util.events.IEventSource`
- parameter: `proxy`, type: `com.pnfsoftware.jeb.util.events.IEventSource`
- return type: `com.pnfsoftware.jeb.util.events.IEventListener`

Description: Relay events issued from an origin to the listeners of a proxy.
parameter: origin: events are emitted by this origin event source
parameter: proxy: events will be relayed by this proxy event source
return: the event listener/relayer object, which should be disposed by the caller after the         origin is destroyed

