String name = endpoint.getName();  Long cpt = (Long) routed.get(name); long count = 0;  if (cpt != null) { count = cpt.longValue();
List list = new ArrayList(endpoints); synchronized (list) { for (int i = 0; i < list.size(); i++) { incrementRoutedMessage((UMOEndpoint) list.get(i)); }
    public synchronized void incrementRoutedMessage(UMOImmutableEndpoint endpoint)    {        if (endpoint == null) {            return;        }        String name = endpoint.getName();        Long cpt = (Long) routed.get(name);        long count = 0;        if (cpt != null) {            count = cpt.longValue();        }        // TODO we should probably use a MutableLong here,        // but that might be problematic for remote MBean access (serialization)        routed.put(name, new Long(++count));        totalRouted++;        totalReceived++;    }