1    /*
2     * Copyright 2010 :torweg free software group
3     *
4     * This program is free software: you can redistribute it and/or modify
5     * it under the terms of the GNU General Public License as published by
6     * the Free Software Foundation, either version 3 of the License, or
7     * (at your option) any later version.
8     * 
9     * This program is distributed in the hope that it will be useful,
10    * but WITHOUT ANY WARRANTY; without even the implied warranty of
11    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    * GNU General Public License for more details.
13    * 
14    * You should have received a copy of the GNU General Public License
15    * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16    *
17    */
18   package org.torweg.pulse.component.statistics.aggregator.task;
19   
20   import org.torweg.pulse.bundle.Bundle;
21   import org.torweg.pulse.component.statistics.DataAggregationJobletConfiguration;
22   
23   /**
24    * Represents a task which is to be executed before anything is being done or
25    * after everything has been done by the {@code DataAggregationJoblet}.
26    * 
27    * @author Daniel Dietz
28    * @version $Revision: 1544 $
29    */
30   public interface IPreRunAndOrPostRunTask {
31   
32       /**
33        * The main method of the {@code IPreRunAndOrPostRunTask} which is
34        * being called before anything is being done or after everything has been
35        * done by the {@code DataAggregationJoblet}.
36        * 
37        * @param mode
38        *            the current {@code TaskExecutionMode}
39        * @param config
40        *            the {@code DataAggregationJobletConfiguration}
41        * @param bundle
42        *            the current {@code Bundle}, e.g. for retrieving a
43        *            {@code Configuration}
44        */
45       void execute(TaskExecutionMode mode,
46               DataAggregationJobletConfiguration config, Bundle bundle);
47   
48   }
49