I think the logic should stay in this class. It's no different from other context switching except it make use of activeContexts.