You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
811 B

import {HTTPKernelModule} from '../HTTPKernelModule'
import {Inject, Injectable} from '../../../di'
import {HTTPKernel} from '../HTTPKernel'
import {Request} from '../../lifecycle/Request'
import {Bus} from '../../../support/bus'
* HTTP kernel module that creates a request-specific event bus
* and injects it into the request container.
export class ClearRequestEventBusHTTPModule extends HTTPKernelModule {
protected bus!: Bus
public static register(kernel: HTTPKernel): void {
public async apply(request: Request): Promise<Request> {
const requestBus = request.make<Bus>(Bus)
await requestBus.down()
// FIXME disconnect request bus from global event bus
return request