Options
All
  • Public
  • Public/Protected
  • All
Menu

Services Manager

class

ServiceManager

Hierarchy

  • EventEmitter
    • ServiceManager

Index

Constructors

constructor

Properties

Protected providers

providers: IUniq<IServiceProvider & Partial<IClientProvider>>

servers

servers: IUniq<Server>

services

services: IUniq<IServiceJson>

Static defaultMaxListeners

defaultMaxListeners: number

Methods

add

  • add(action: object, callback: function): void
  • Add service

    Parameters

    • action: object
    • callback: function
        • (err: Error | null, action?: undefined | object): void
        • Parameters

          • err: Error | null
          • Optional action: undefined | object

          Returns void

    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

all

  • all(): object

delete

  • delete(action: object, callback: function): void
  • Delete service

    Parameters

    • action: object
      • id: string
    • callback: function
        • (err: Error | null, action?: undefined | object): void
        • Parameters

          • err: Error | null
          • Optional action: undefined | object

          Returns void

    Returns void

disable

  • disable(id: string, callback: function): void
  • Disable service

    Parameters

    • id: string
    • callback: function
        • (err: Error | null): void
        • Parameters

          • err: Error | null

          Returns void

    Returns void

emit

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

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

    Returns boolean

enable

  • enable(id: string, callback: function): Server

eventNames

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

export

  • export(ids: string[]): object

find

  • find(id: string): object

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

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

    • type: string | symbol

    Returns number

listeners

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

    • event: string | symbol

    Returns Function[]

off

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

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

          • Rest ...args: any[]

          Returns void

    Returns this

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

Private persist

  • persist(callback: function): void

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

rawListeners

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

    • event: string | symbol

    Returns Function[]

register

removeAllListeners

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

    • Optional event: string | symbol

    Returns this

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

request

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

switch

  • switch(action: object, callback: function): void
  • Switch service

    Parameters

    • action: object
      • enabled: boolean
      • id: string
    • callback: function
        • (err: Error | null, action?: undefined | object): void
        • Parameters

          • err: Error | null
          • Optional action: undefined | object

          Returns void

    Returns void

update

  • update(action: object, callback: function): void
  • Update service

    Parameters

    • action: object
    • callback: function
        • (err: Error | null, action?: undefined | object): void
        • Parameters

          • err: Error | null
          • Optional action: undefined | object

          Returns void

    Returns void

Static listenerCount

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

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc