Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RpcContextCreator

Hierarchy

  • RpcContextCreator

Index

Constructors

constructor

  • new RpcContextCreator(rpcProxy: RpcProxy, exceptionFiltersContext: ExceptionFiltersContext, pipesContextCreator: PipesContextCreator, pipesConsumer: PipesConsumer, guardsContextCreator: GuardsContextCreator, guardsConsumer: GuardsConsumer, interceptorsContextCreator: InterceptorsContextCreator, interceptorsConsumer: InterceptorsConsumer): RpcContextCreator

Properties

Private Readonly contextUtils

contextUtils: ContextUtils = new ContextUtils()

Private Readonly exceptionFiltersContext

exceptionFiltersContext: ExceptionFiltersContext

Private Readonly guardsConsumer

guardsConsumer: GuardsConsumer

Private Readonly guardsContextCreator

guardsContextCreator: GuardsContextCreator

Private Readonly handlerMetadataStorage

handlerMetadataStorage: HandlerMetadataStorage<RpcHandlerMetadata, any> = new HandlerMetadataStorage<RpcHandlerMetadata>()

Private Readonly interceptorsConsumer

interceptorsConsumer: InterceptorsConsumer

Private Readonly interceptorsContextCreator

interceptorsContextCreator: InterceptorsContextCreator

Private Readonly pipesConsumer

pipesConsumer: PipesConsumer

Private Readonly pipesContextCreator

pipesContextCreator: PipesContextCreator

Private Readonly rpcParamsFactory

rpcParamsFactory: RpcParamsFactory = new RpcParamsFactory()

Private Readonly rpcProxy

rpcProxy: RpcProxy

Methods

create

  • create<T>(instance: Controller, callback: (...args: unknown[]) => Observable<any>, module: string, methodName: string, contextId?: ContextId, inquirerId?: string, defaultCallMetadata?: Record<string, any>): (...args: any[]) => Promise<Observable<any>>
  • Type parameters

    Parameters

    • instance: Controller
    • callback: (...args: unknown[]) => Observable<any>
        • (...args: unknown[]): Observable<any>
        • Parameters

          • Rest ...args: unknown[]

          Returns Observable<any>

    • module: string
    • methodName: string
    • Default value contextId: ContextId = STATIC_CONTEXT
    • Optional inquirerId: string
    • Default value defaultCallMetadata: Record<string, any> = DEFAULT_CALLBACK_METADATA

    Returns (...args: any[]) => Promise<Observable<any>>

      • (...args: any[]): Promise<Observable<any>>
      • Parameters

        • Rest ...args: any[]

        Returns Promise<Observable<any>>

createGuardsFn

  • createGuardsFn<TContext>(guards: any[], instance: Controller, callback: (...args: unknown[]) => unknown, contextType?: TContext): Function | null

createPipesFn

  • createPipesFn(pipes: PipeTransform[], paramsOptions: (ParamProperties & { metatype?: unknown })[]): pipesFn

exchangeKeysForValues

  • exchangeKeysForValues<TMetadata>(keys: string[], metadata: TMetadata, moduleContext: string, paramsFactory: RpcParamsFactory, contextFactory: (args: unknown[]) => ExecutionContextHost): ParamProperties[]
  • Type parameters

    • TMetadata = any

    Parameters

    • keys: string[]
    • metadata: TMetadata
    • moduleContext: string
    • paramsFactory: RpcParamsFactory
    • contextFactory: (args: unknown[]) => ExecutionContextHost
        • (args: unknown[]): ExecutionContextHost
        • Parameters

          • args: unknown[]

          Returns ExecutionContextHost

    Returns ParamProperties[]

getMetadata

  • getMetadata<TMetadata, TContext>(instance: Controller, methodName: string, defaultCallMetadata: Record<string, any>, contextType: TContext): RpcHandlerMetadata

getParamValue

  • getParamValue<T>(value: T, __namedParameters: { data: any; metatype: any; type: any }, pipes: PipeTransform[]): Promise<any>

reflectCallbackParamtypes

  • reflectCallbackParamtypes(instance: Controller, callback: (...args: unknown[]) => unknown): unknown[]

Generated using TypeDoc