1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.log4j.chainsaw;
19
20 import java.util.EventListener;
21 import java.util.List;
22
23
24 /***
25 * Implementations of this interface like to be notified
26 * of arriving batches of LoggingEvents, but may only
27 * be interested in those coming from a particular source
28 * @author Paul Smith <psmith@apache.org>
29 *
30 */
31 public interface EventBatchListener extends EventListener {
32 /***
33 * Returns the string representing the identifier
34 * that this instance is only interested in, or
35 * null if this instance is interested in ALL events from
36 * any identifier
37 * @return String identifier of the interested source
38 */
39 public String getInterestedIdentifier();
40
41 /***
42 * Implementations receive a list of LoggingEvent instances only if they are interested,
43 * that is, if the source of the eventBatch matches this instances interested identifier
44 * @param events List of LoggingEvent instances
45 * @param identifier the identifier this list of LoggingEvents is associated with
46 */
47 public void receiveEventBatch(String identifier, List events);
48 }