1 /* 2 * Copyright (C) 2004-2006 Christian Siefkes <christian@siefkes.net>. 3 * Development of this software is supported by the German Research Society, 4 * Berlin-Brandenburg Graduate School in Distributed Information Systems 5 * (DFG grant no. GRK 316). 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, visit 19 * http://www.gnu.org/licenses/gpl.html or write to the Free Software 20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21 */ 22 package de.fu_berlin.ties; 23 24 /*** 25 * An abstract processor that just stores a configuration. 26 * 27 * @author Christian Siefkes 28 * @version $Revision: 1.4 $, $Date: 2006/10/21 16:03:52 $, $Author: siefkes $ 29 */ 30 public abstract class ConfigurableProcessor implements Processor { 31 32 /*** 33 * Used to configure this instance. 34 */ 35 private final TiesConfiguration config; 36 37 /*** 38 * Creates a new instance. 39 * 40 * @param conf used to configure this instance; if <code>null</code>, 41 * the {@linkplain TiesConfiguration#CONF standard configuration} is used 42 */ 43 public ConfigurableProcessor(final TiesConfiguration conf) { 44 super(); 45 config = (conf == null) ? TiesConfiguration.CONF : conf; 46 } 47 48 /*** 49 * Returns the configuration used by this instance. 50 * @return the used configuration 51 */ 52 public TiesConfiguration getConfig() { 53 return config; 54 } 55 56 }