1 | /*
|
---|
2 | * Copyright 2000,2002,2004 The Apache Software Foundation
|
---|
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 | */
|
---|
17 |
|
---|
18 | package org.apache.tools.ant;
|
---|
19 |
|
---|
20 | import java.util.EventListener;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Instances of classes that implement this interface can register
|
---|
24 | * to be notified when things happened during a build.
|
---|
25 | *
|
---|
26 | * @see BuildEvent
|
---|
27 | * @see Project#addBuildListener(BuildListener)
|
---|
28 | *
|
---|
29 | */
|
---|
30 | public interface BuildListener extends EventListener {
|
---|
31 |
|
---|
32 | /**
|
---|
33 | * Signals that a build has started. This event
|
---|
34 | * is fired before any targets have started.
|
---|
35 | *
|
---|
36 | * @param event An event with any relevant extra information.
|
---|
37 | * Must not be <code>null</code>.
|
---|
38 | */
|
---|
39 | void buildStarted(BuildEvent event);
|
---|
40 |
|
---|
41 | /**
|
---|
42 | * Signals that the last target has finished. This event
|
---|
43 | * will still be fired if an error occurred during the build.
|
---|
44 | *
|
---|
45 | * @param event An event with any relevant extra information.
|
---|
46 | * Must not be <code>null</code>.
|
---|
47 | *
|
---|
48 | * @see BuildEvent#getException()
|
---|
49 | */
|
---|
50 | void buildFinished(BuildEvent event);
|
---|
51 |
|
---|
52 | /**
|
---|
53 | * Signals that a target is starting.
|
---|
54 | *
|
---|
55 | * @param event An event with any relevant extra information.
|
---|
56 | * Must not be <code>null</code>.
|
---|
57 | *
|
---|
58 | * @see BuildEvent#getTarget()
|
---|
59 | */
|
---|
60 | void targetStarted(BuildEvent event);
|
---|
61 |
|
---|
62 | /**
|
---|
63 | * Signals that a target has finished. This event will
|
---|
64 | * still be fired if an error occurred during the build.
|
---|
65 | *
|
---|
66 | * @param event An event with any relevant extra information.
|
---|
67 | * Must not be <code>null</code>.
|
---|
68 | *
|
---|
69 | * @see BuildEvent#getException()
|
---|
70 | */
|
---|
71 | void targetFinished(BuildEvent event);
|
---|
72 |
|
---|
73 | /**
|
---|
74 | * Signals that a task is starting.
|
---|
75 | *
|
---|
76 | * @param event An event with any relevant extra information.
|
---|
77 | * Must not be <code>null</code>.
|
---|
78 | *
|
---|
79 | * @see BuildEvent#getTask()
|
---|
80 | */
|
---|
81 | void taskStarted(BuildEvent event);
|
---|
82 |
|
---|
83 | /**
|
---|
84 | * Signals that a task has finished. This event will still
|
---|
85 | * be fired if an error occurred during the build.
|
---|
86 | *
|
---|
87 | * @param event An event with any relevant extra information.
|
---|
88 | * Must not be <code>null</code>.
|
---|
89 | *
|
---|
90 | * @see BuildEvent#getException()
|
---|
91 | */
|
---|
92 | void taskFinished(BuildEvent event);
|
---|
93 |
|
---|
94 | /**
|
---|
95 | * Signals a message logging event.
|
---|
96 | *
|
---|
97 | * @param event An event with any relevant extra information.
|
---|
98 | * Must not be <code>null</code>.
|
---|
99 | *
|
---|
100 | * @see BuildEvent#getMessage()
|
---|
101 | * @see BuildEvent#getPriority()
|
---|
102 | */
|
---|
103 | void messageLogged(BuildEvent event);
|
---|
104 | }
|
---|