providers.add(provider);
DMDServiceProvider provider = (DMDServiceProvider) provider_class.newInstance(); if (!provider.canProvide(query)) { System.err.println("DinomedaTrader: provider-offer missmatch"); System.err.println("Provider=" + class_name); System.err.println("offer=" + offers[count]); provider = null; } else { result_list.add(provider); } } catch (Exception exception) { exception.printStackTrace(System.err);
  public DMDServiceProvider[] findServices(DMDServiceQuery query)      throws IllegalArgumentException  {    if (query == null)    {      throw new IllegalArgumentException();    }    Vector providers = new Vector(providers_.size());    DMDServiceProvider provider = null;    Iterator iter = providers_.values().iterator();    while (iter.hasNext())    {      provider = (DMDServiceProvider) iter.next();      if (provider != null)      {        if (provider.canProvide(query))        {          providers.add(provider);        }      }    }    DMDServiceProvider[] result = new DMDServiceProvider[providers.size()];    return (DMDServiceProvider[]) providers.toArray(result);  }