View Javadoc

1   /*
2    *   Copyright 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  package org.apache.ldap.server;
18  
19  import javax.naming.NamingException;
20  
21  /***
22   * An event handler that listens to the changes occurs to
23   * {@link DirectoryService}.
24   * 
25   * @author The Apache Directory Project
26   * @version $Rev: 307234 $, $Date: 2005-10-07 21:43:33 -0400 (Fri, 07 Oct 2005) $
27   */
28  public interface DirectoryServiceListener
29  {
30      /***
31       * Invoked before starting up {@link DirectoryService}.
32       */
33      void beforeStartup( DirectoryService service ) throws NamingException;
34      /***
35       * Invoked after starting up {@link DirectoryService}.
36       */
37      void afterStartup( DirectoryService service ) throws NamingException;
38      /***
39       * Invoked before shutting down {@link DirectoryService}.
40       */
41      void beforeShutdown( DirectoryService service ) throws NamingException;
42      /***
43       * Invoked after shutting down {@link DirectoryService}.
44       */
45      void afterShutdown( DirectoryService service ) throws NamingException;
46      /***
47       * Invoked before calling {@link DirectoryService#sync()}.
48       */
49      void beforeSync( DirectoryService service ) throws NamingException;
50      /***
51       * Invoked after calling {@link DirectoryService#sync()}.
52       */
53      void afterSync( DirectoryService service ) throws NamingException;
54  }