Create your own framework

this abstract application knows about Request, Response, MiddlewareBulder(relay), so you have to write your application logic in methods(container, middleware, route and response methods) of your extends application class. these methods are executed by run() method.

response

In response method, you have to pass your controller callable handler to $this->addQueue('action', $handler, $args).
it is different how to get $handler, because it depends on your selected router library.