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.schema;
18  
19  
20  import java.util.Comparator;
21  
22  import javax.naming.NamingException;
23  
24  import org.slf4j.Logger;
25  import org.slf4j.LoggerFactory;
26  
27  
28  /***
29   * An adapter for the ComparatorRegistry's monitor.
30   *
31   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
32   * @version $Rev: 280870 $
33   */
34  public class ComparatorRegistryMonitorAdapter 
35      implements ComparatorRegistryMonitor
36  {
37      private static final Logger log = LoggerFactory.getLogger( ComparatorRegistryMonitorAdapter.class );
38  
39      /* (non-Javadoc)
40       * @see org.apache.ldap.server.schema.ComparatorRegistryMonitor#registered(
41       * org.apache.eve.schema.Comparator)
42       */
43      public void registered( String oid, Comparator comparator )
44      {
45      }
46  
47      
48      /* (non-Javadoc)
49       * @see org.apache.ldap.server.schema.ComparatorRegistryMonitor#lookedUp(
50       * org.apache.eve.schema.Comparator)
51       */
52      public void lookedUp( String oid, Comparator comparator )
53      {
54      }
55  
56      
57      /* (non-Javadoc)
58       * @see org.apache.ldap.server.schema.ComparatorRegistryMonitor#lookupFailed(
59       * java.lang.String, javax.naming.NamingException)
60       */
61      public void lookupFailed( String oid, NamingException fault )
62      {
63          if ( fault != null )
64          {
65              log.warn( "Failed to look up the comparator registry: " + oid, fault );
66          }
67      }
68  
69      
70      /* (non-Javadoc)
71       * @see org.apache.ldap.server.schema.ComparatorRegistryMonitor#registerFailed(
72       * org.apache.eve.schema.Comparator, javax.naming.NamingException)
73       */
74      public void registerFailed( String oid, Comparator comparator, NamingException fault )
75      {
76          if ( fault != null )
77          {
78              log.warn( "Failed to register a comparator for oid '" + oid + "'.", fault );
79          }
80      }
81  }