abstract class HttpHandler {
	protected abstract route: string | null;
	protected abstract action: (...any: any[]) => any;
	protected context: any;
	
	public constructor(context: Record<string, any>) {
		this.context = context ?? null;
	}

	public setContext(context: Record<string, any>): HttpHandler {
		this.context = context;
		return this;
	}

	public getContext(): Record<string, any> {
		return this.context;
	}

	public getRoute(): string | null {
		return this.route;
	}

	public getAction(): (...any: any[]) => any {
		return this.action;
	}
}

export { HttpHandler };