]> git.somenet.org - pub/jan/dst18.git/blob - ass2-aop/src/main/java/dst/ass2/aop/IPluginExecutor.java
Add template for assignment 2
[pub/jan/dst18.git] / ass2-aop / src / main / java / dst / ass2 / aop / IPluginExecutor.java
1 package dst.ass2.aop;
2
3 import java.io.File;
4
5 /**
6  * The plugin executor interface.
7  */
8 public interface IPluginExecutor {
9
10     /**
11      * Adds a directory to monitor.
12      * May be called before and also after start has been called.
13      *
14      * @param dir the directory to monitor.
15      */
16     void monitor(File dir);
17
18     /**
19      * Stops monitoring the specified directory.
20      * May be called before and also after start has been called.
21      *
22      * @param dir the directory which should not be monitored anymore.
23      */
24     void stopMonitoring(File dir);
25
26     /**
27      * Starts the plugin executor.
28      * All added directories will be monitored and any .jar file processed.
29      * If there are any {@link IPluginExecutable} implementations,
30      * they are executed within own threads.
31      */
32     void start();
33
34     /**
35      * Stops the plugin executor.
36      * The monitoring of directories and the execution
37      * of the plugins should stop as soon as possible.
38      */
39     void stop();
40 }