Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PetitionsMonitor

Monitors the petitions data for changes and generates a notification event for changes.

Hierarchy

  • EventEmitter
    • PetitionsMonitor

Index

Constructors

constructor

Events

on

  • Parameters

    • eventName: string
    • listener: function
        • (...eventObjects: any[]): void
        • Parameters

          • Rest ...eventObjects: any[]

          Returns void

    Returns PetitionsMonitor

  • Parameters

    • eventName: "new-petition"
    • listener: function
        • (newPetition: any): void
        • Parameters

          • newPetition: any

          Returns void

    Returns PetitionsMonitor

  • Parameters

    • eventName: "updated-petition"
    • listener: function
        • (newPetitionData: any, oldPetitionData: any): void
        • Parameters

          • newPetitionData: any
          • oldPetitionData: any

          Returns void

    Returns PetitionsMonitor

  • Parameters

    • eventName: "removed-petition"
    • listener: function
        • (removedPetiton: any): void
        • Parameters

          • removedPetiton: any

          Returns void

    Returns PetitionsMonitor

Properties

Private conf

conf: PetitionsMonitorConfig

Private deltaEvents

deltaEvents: Array<any> = []

Private events

events: Array<any> = []

Methods

addMonitorDeltaEvent

  • Add an event to emit when the check function returns true. The check function is passed the the new and old data. Returns the monitor.

    Parameters

    • event: any

      The name of the event to add.

    • check: any

      The check required to emit the event.

    Returns PetitionsMonitor

addMonitorEvent

  • Add an event to emit when the check function returns true. The check function is passed the the new data. Returns the monitor.

    Parameters

    • event: any

      The name of the event to add.

    • check: any

      The predicate required to emit the event.

    Returns PetitionsMonitor

emit

  • emit(eventName: string, ...eventObjects: any[]): EventEmitter

removeAllListeners

  • removeAllListeners(eventName: string): EventEmitter

start

Generated using TypeDoc