View Javadoc
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  
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     @param repository repository
37     */
38    void configurationResetEvent(LoggerRepository repository);
39  
40    /**
41      Called when the repository configuration is changed.
42     @param repository repository
43     */
44    void configurationChangedEvent(LoggerRepository repository);
45  
46    /**
47      Called when the repository is shutdown. When this method is
48      invoked, the repository is still valid (ie it has not been
49      shutdown, but will be after this method returns).
50      @param repository repository.
51     */
52    void shutdownEvent(LoggerRepository repository);
53  }