Task manager in mediator design pattern