Update DispatcherAgent.java

little refactor