1 /* 2 * (C)opyright 2010, Nikolaos Georgosopoulos 3 * 4 * This file is part of URLChecker. 5 6 URLChecker is free software: you can redistribute it and/or modify 7 it under the terms of the Lesser General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 URLChecker is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the Lesser General Public License 17 along with URLChecker. If not, see <http://www.gnu.org/licenses/>. 18 19 */ 20 package net.sf.urlchecker.commands; 21 22 import java.util.Set; 23 24 import org.apache.commons.configuration.ConfigurationException; 25 26 /** 27 * The URLChecker Command interface. All Commands must have the chain of 28 * responsibilities design pattern in mind. For this it is best to extend the 29 * {@link net.sf.urlchecker.commands.AbstractCommand} and call 30 * super.process(Context) method after finished processing in the specific 31 * command. 32 * 33 * <p> 34 * <b> $Id: Command.java 181 2010-12-12 23:39:00Z georgosn $</b> 35 * </p> 36 * 37 * @author $LastChangedBy: georgosn $ 38 * @version $LastChangedRevision: 181 $ 39 */ 40 public interface Command { 41 42 /** 43 * Returns the successor. 44 * 45 * @return the successor 46 */ 47 Command getSuccessor(); 48 49 /** 50 * This method processes the input 51 * {@link net.sf.urlchecker.commands.Context} and forwards the results on to 52 * the successor. 53 * 54 * @param input 55 * the input 56 * @return the set 57 * @throws org.apache.commons.configuration.ConfigurationException 58 * the configuration exception 59 */ 60 Set<Result> process(Context input) throws ConfigurationException; 61 }