1 /* 2 * Copyright (C) The Apache Software Foundation. All rights reserved. 3 * 4 * This software is published under the terms of the Apache Software License 5 * version 1.1, a copy of which has been included with this distribution in 6 * the LICENSE.txt file. 7 */ 8 package org.apache.avalon.excalibur.command; 9 10 /** 11 * A Signal is a specific type of QueueElement that denotes a Control code for 12 * the Queue system. 13 * 14 * @author <a HREF="mailto:bloritsch@apache.org">Berin Loritsch</a> 15 */ 16 public interface RepeatedCommand extends DelayedCommand 17 { 18 /** 19 * If the value is less than 1 (0 or negative), the command repeats for as 20 * long as the CommandManager is running. If the value is above 0, the Command 21 * repeats only for that specific amount of times before it is removed from 22 * the system. 23 */ 24 int getNumberOfRepeats(); 25 26 /** 27 * Gets the repeat interval so that the CommandQueue keeps it for the specified 28 * amount of time before enqueuing it again. This value must not be negative. 29 */ 30 long getRepeatInterval(); 31 }