Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Server

Hierarchy

  • EventEmitter
    • Server

Index

Constructors

constructor

Properties

app

cronHandlers

cronHandlers: object = null

Type declaration

  • [handler: string]: object
    • [method: string]: function
        • (): void
        • Returns void

crons

crons: Cron[] = []

filterService

filterService: FilterService = null

globalFilterService

globalFilterService: FilterService = null

handlerService

handlerService: HandlerService = null

jobs

jobs: object

Type declaration

  • [cronId: string]: number

opts

state

state: number = ST_INITED

Static defaultMaxListeners

defaultMaxListeners: number

Methods

addCrons

  • addCrons(crons: Cron[]): void
  • Add crons at runtime.

    Parameters

    • crons: Cron[]

      would be added in application

    Returns void

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

afterStart

  • afterStart(): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

globalHandle

handle

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

on

  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeCrons

  • removeCrons(crons: Cron[]): void
  • Remove crons at runtime.

    Parameters

    • crons: Cron[]

      would be removed in application

    Returns void

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

start

  • start(): void

stop

  • stop(): void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number