See:https://github.com/secondsun/AerogearDashboard for a demo of what I have in mind.
Specifically:Startup.java, PipeControoler.java, DynamicsController.java and RuntimeRouter.java