    import AdvanceEventEmitter from 'pvbid-sdk/src/utils/AdvanceEventEmitter.js'

public class | source

# AdvanceEventEmitter

#### Extends:

eventemitter3~EventEmitter → AdvanceEventEmitter

#### Direct Subclass:

BidEntity

#### Indirect Subclass:

Assembly, Bid, BidVariable, Component, ComponentGroup, Datatable, Field, FieldGroup, LineItem, Metric, Project

The AdvanceEventEmitter extends event emitter 3's functionality to check for max executions (due to circular loops) and adds an ability to fire a delayed event.

## Constructor Summary

Public Constructor
public | constructor() Creates an instance of AdvanceEventEmitter. |

## Member Summary

Public Members
public | maxEvents: number Maximum number of events fired for the requester before events stop. |

## Method Summary

Public Methods
public | on(eventName: string, requesterId: string, callback: function) |
public | onDelay(eventName: string, ms: number, requesterId: string, callback: function) |
public | removeListenerByRequester(eventName: string, requesterId: string) Removes event listeners by event and requesterId. |

## Public Constructors

### public constructor() source

Creates an instance of AdvanceEventEmitter.

## Public Members

### public maxEvents: number source

Maximum number of events fired for the requester before events stop.

## Public Methods

### public on(eventName: string, requesterId: string, callback: function) source

#### Params:

Name | Type | Attribute | Description
eventName | string |  |
requesterId | string |  |
callback | function |  |

### public onDelay(eventName: string, ms: number, requesterId: string, callback: function) source

#### Params:

Name | Type | Attribute | Description
eventName | string |  |
ms | number |  |
requesterId | string |  |
callback | function |  |

### public removeListenerByRequester(eventName: string, requesterId: string) source

Removes event listeners by event and requesterId.

#### Params:

Name | Type | Attribute | Description
eventName | string |  |
requesterId | string |  |