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 package org.apache.log4j.spi;
19
20
21 /**
22 * Interface used to listen for LoggerRepository related
23 * events such as startup, reset, and shutdown. Clients register
24 * an instance of the interface and the instance is called back
25 * when the various events occur.
26 * <p>
27 * LoggerRepository provides methods for adding and removing
28 * LoggerRepositoryEventListener instances.
29 *
30 * @author Ceki Gülcü
31 * @author Mark Womack
32 */
33 public interface LoggerRepositoryEventListener {
34 /**
35 * Called when the repository configuration is reset.
36 *
37 * @param repository repository
38 */
39 void configurationResetEvent(LoggerRepository repository);
40
41 /**
42 * Called when the repository configuration is changed.
43 *
44 * @param repository repository
45 */
46 void configurationChangedEvent(LoggerRepository repository);
47
48 /**
49 * Called when the repository is shutdown. When this method is
50 * invoked, the repository is still valid (ie it has not been
51 * shutdown, but will be after this method returns).
52 *
53 * @param repository repository.
54 */
55 void shutdownEvent(LoggerRepository repository);
56 }