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; 20 21 import jgroup.core.ConfigurationException; 22 import jgroup.relacs.config.ExperimentConfig; 23 24 /** 25 * Objects implementing the <code>Runnable</code> interface can be added to the list 26 * of elements to run in an experiment. Experiment runlists are contained 27 * in <code>ExperimentConfig</code> objects. 28 * 29 * The <code>Runnable</code> interface extends the 30 * <code>ConfigurationObject</code> interface, so that <code>Runnable</code> 31 * objects define how to parse their own tags. 32 * 33 * The <code>run()</code> method contains code defining the behaviour of 34 * this <code>Runnable</code>. 35 * 36 * @author Bjarte Svaeren 37 */ 38 public interface Runnable 39 { 40 41 /** 42 * Starts the Runnable. 43 * 44 * @param ec The ExperimentConfiguration describing the experiment. 45 * @throws ConfigurationException 46 */ 47 void run(ExperimentConfig ec) 48 throws ConfigurationException; 49 50 51 /** 52 * Returns a complete list of the sysproperties that this Runnable 53 * can use, and their restrictions. 54 * 55 * @return An array of strings with property names. 56 */ 57 public PropertyDefinition[] getProperties(); 58 }