}
public synchronized void registerEventNetRouter(String agentid, EventNetRouter router) throws RegistrationException {
EventNetRouter rt = (EventNetRouter) routers.get(agentid);
if(rt != null) throw new RegistrationException("Router is already registered under the specified agentid: " + agentid + " (Either you should reuse existing one or there are more agents with same agentid - which should never be - which means wrong configuration.)");
routers.put(agentid, router);
}