class ServerRestService {

    @GET
    @Path( "/" )
    @Produces( "application/json" )
    public Map<String, HmsNode> getHosts()
        throws HMSRestException
    {

        Map<String, HmsNode> nodeMapCopy = new ConcurrentHashMap<String, HmsNode>();

        Set<Entry<String, HmsNode>> nodeEntrySet = serverConnector.getNodeMap().entrySet();
        if ( nodeEntrySet != null && nodeEntrySet.size() > 0 )
        {
            Iterator<Entry<String, HmsNode>> itr = nodeEntrySet.iterator();
            while ( itr.hasNext() )
            {
                Entry<String, HmsNode> curItem = itr.next();
                HmsNode hmsNode = curItem.getValue();
                HmsNode hmsNodeCopy = (HmsNode) HmsGenericUtil.maskPassword( hmsNode );
                nodeMapCopy.put( curItem.getKey(), hmsNodeCopy );
            }
        }

        return nodeMapCopy;
    }

}