View Javadoc

1   /*
2    * Copyright (c) 1998-2004 The Jgroup Team.
3    *
4    * This program is free software; you can redistribute it and/or modify
5    * it under the terms of the GNU Lesser General Public License version 2 as
6    * published by the Free Software Foundation.
7    *
8    * This program is distributed in the hope that it will be useful,
9    * but WITHOUT ANY WARRANTY; without even the implied warranty of
10   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11   * GNU Lesser General Public License for more details.
12   *
13   * You should have received a copy of the GNU Lesser General Public License
14   * along with this program; if not, write to the Free Software
15   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16   *
17   */
18  
19  package jgroup.experiment.runnables;
20  
21  import java.util.Iterator;
22  import java.util.Map;
23  
24  import jgroup.core.ConfigurationException;
25  import jgroup.experiment.PropertyDefinition;
26  import jgroup.experiment.Runnable;
27  import jgroup.relacs.config.ExperimentConfig;
28  
29  /**
30   * @author Hein Meling
31   */
32  public class EchoProperties
33    implements Runnable
34  {
35  
36    /* (non-Javadoc)
37     * @see jgroup.experiment.Runnable#run(jgroup.relacs.config.ExperimentConfig)
38     */
39    public void run(ExperimentConfig ec)
40      throws ConfigurationException
41    {
42  //    System.out.println("prop: " + ec.getProperties());
43      Map props = ec.getProperties(this);
44      for (Iterator iter = props.entrySet().iterator(); iter.hasNext();) {
45        Map.Entry entry = (Map.Entry) iter.next();
46        System.out.print(entry + ", ");
47      }
48      System.out.println();
49    }
50  
51    /* (non-Javadoc)
52     * @see jgroup.experiment.Runnable#getProperties()
53     */
54    public PropertyDefinition[] getProperties() {
55      return null;
56    }
57  
58  } // END EchoProperties