1 /* 2 * Copyright 2012 smartics, Kronseder & Reiner GmbH 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package de.smartics.ci.comm.command; 17 18 import de.smartics.ci.comm.CiSystem; 19 20 /** 21 * A command to be run against a target. 22 * 23 * @param <T> the type of the command the result belongs to. 24 */ 25 public interface Command<T extends Command<T>> 26 { 27 // ********************************* Fields ********************************* 28 29 // --- constants ------------------------------------------------------------ 30 31 // ****************************** Initializer ******************************* 32 33 // ****************************** Inner Classes ***************************** 34 35 // ********************************* Methods ******************************** 36 37 // --- get&set -------------------------------------------------------------- 38 39 // --- business ------------------------------------------------------------- 40 41 /** 42 * Executes the command. 43 * 44 * @param target the target to execute the command against. 45 * @throws CommandException signals problems encountered while executing the 46 * command. 47 */ 48 void execute(CiSystem target) throws CommandException; 49 50 // --- object basics -------------------------------------------------------- 51 52 }