# PlatformHandler Service

Module
import { PlatformHandler } from "@tsed/common"
Source/packages/common/src/platform/services/PlatformHandler.ts

# Overview

class PlatformHandler {
    constructor(injector: InjectorService);
    createHandlerMetadata(obj: any | EndpointMetadata): HandlerMetadata;
    createHandler(metadata: HandlerMetadata | any): any;
    getParam(param: ParamMetadata, context: HandlerContext): any;
    getFilter(param: ParamMetadata, context: HandlerContext): any;
    protected onRequest(context: HandlerContext): Promise<void>;
}

# Members

createHandlerMetadata(obj: any | EndpointMetadata): HandlerMetadata

createHandler(metadata: HandlerMetadata | any): any

Create a native middleware based on the given metadata and return an instance of HandlerContext


getParam(param: ParamMetadata, context: HandlerContext): any

Get param from the context


getFilter(param: ParamMetadata, context: HandlerContext): any

Return a custom filter


protected onRequest(context: HandlerContext): Promise<void>