Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ActorAbstractMediaTyped<HI, HT, HO>

An abstract actor that handles media-typed actions.

It splits up a action between a 'handle' and a 'mediaTypes' action. A 'mediaTypes' action is used to retrieve the available media types from this actor. A 'handle' action is abstract, and can be implemented to do anything, such as parsing, serializing, etc.

see

IActionAbstractMediaTyped

see

ActorAbstractMediaTypedFixed

Type parameters

  • HI

  • HT

  • HO

Hierarchy

Index

Constructors

constructor

Properties

Readonly beforeActors

Readonly bus

Readonly name

name: string

Methods

deinitialize

  • deinitialize(): Promise<any>
  • Deinitialize this actor. This should be used for cleaning up things when the application is shut down, such as closing files and removing temporary files.

    Returns Promise<any>

    A promise that resolves when the actor has been deinitialized.

Protected getDefaultLogData

  • getDefaultLogData(context: undefined | ActionContext, data?: () => any): any

Abstract getMediaTypeFormats

  • getMediaTypeFormats(context?: ActionContext): Promise<Record<string, string>>

Abstract getMediaTypes

  • getMediaTypes(context?: ActionContext): Promise<Record<string, number>>

initialize

  • initialize(): Promise<any>
  • Initialize this actor. This should be used for doing things that take a while, such as opening files.

    Returns Promise<any>

    A promise that resolves when the actor has been initialized.

Protected logDebug

  • logDebug(context: undefined | ActionContext, message: string, data?: () => any): void

Protected logError

  • logError(context: undefined | ActionContext, message: string, data?: () => any): void

Protected logFatal

  • logFatal(context: undefined | ActionContext, message: string, data?: () => any): void

Protected logInfo

  • logInfo(context: undefined | ActionContext, message: string, data?: () => any): void

Protected logTrace

  • logTrace(context: undefined | ActionContext, message: string, data?: () => any): void

Protected logWarn

  • logWarn(context: undefined | ActionContext, message: string, data?: () => any): void

run

Abstract runHandle

  • runHandle(action: HI, mediaType?: string, context?: ActionContext): Promise<HO>

runObservable

test

Abstract testHandle

  • testHandle(action: HI, mediaType?: string, context?: ActionContext): Promise<HT>

Abstract testMediaType

Abstract testMediaTypeFormats

  • testMediaTypeFormats(context?: ActionContext): Promise<boolean>

Static getContextLogger

Generated using TypeDoc