KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tools > ant > BuildListener


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */

18
19 package org.apache.tools.ant;
20
21 import java.util.EventListener JavaDoc;
22
23 /**
24  * Instances of classes that implement this interface can register
25  * to be notified when things happened during a build.
26  *
27  * @see BuildEvent
28  * @see Project#addBuildListener(BuildListener)
29  *
30  */

31 public interface BuildListener extends EventListener JavaDoc {
32
33     /**
34      * Signals that a build has started. This event
35      * is fired before any targets have started.
36      *
37      * @param event An event with any relevant extra information.
38      * Must not be <code>null</code>.
39      */

40     void buildStarted(BuildEvent event);
41
42     /**
43      * Signals that the last target has finished. This event
44      * will still be fired if an error occurred during the build.
45      *
46      * @param event An event with any relevant extra information.
47      * Must not be <code>null</code>.
48      *
49      * @see BuildEvent#getException()
50      */

51     void buildFinished(BuildEvent event);
52
53     /**
54      * Signals that a target is starting.
55      *
56      * @param event An event with any relevant extra information.
57      * Must not be <code>null</code>.
58      *
59      * @see BuildEvent#getTarget()
60      */

61     void targetStarted(BuildEvent event);
62
63     /**
64      * Signals that a target has finished. This event will
65      * still be fired if an error occurred during the build.
66      *
67      * @param event An event with any relevant extra information.
68      * Must not be <code>null</code>.
69      *
70      * @see BuildEvent#getException()
71      */

72     void targetFinished(BuildEvent event);
73
74     /**
75      * Signals that a task is starting.
76      *
77      * @param event An event with any relevant extra information.
78      * Must not be <code>null</code>.
79      *
80      * @see BuildEvent#getTask()
81      */

82     void taskStarted(BuildEvent event);
83
84     /**
85      * Signals that a task has finished. This event will still
86      * be fired if an error occurred during the build.
87      *
88      * @param event An event with any relevant extra information.
89      * Must not be <code>null</code>.
90      *
91      * @see BuildEvent#getException()
92      */

93     void taskFinished(BuildEvent event);
94
95     /**
96      * Signals a message logging event.
97      *
98      * @param event An event with any relevant extra information.
99      * Must not be <code>null</code>.
100      *
101      * @see BuildEvent#getMessage()
102      * @see BuildEvent#getException()
103      * @see BuildEvent#getPriority()
104      */

105     void messageLogged(BuildEvent event);
106 }
107
Popular Tags