directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r357554 - in /directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema: GlobalSyntaxCheckerRegistry.java GlobalSyntaxRegistry.java
Date Sun, 18 Dec 2005 23:25:56 GMT
Author: elecharny
Date: Sun Dec 18 15:25:47 2005
New Revision: 357554

URL: http://svn.apache.org/viewcvs?rev=357554&view=rev
Log:
Deleted the Monitor usage

Modified:
    directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java
    directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java

Modified: directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java?rev=357554&r1=357553&r2=357554&view=diff
==============================================================================
--- directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java
(original)
+++ directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java
Sun Dec 18 15:25:47 2005
@@ -38,8 +38,7 @@
     private final Map syntaxCheckers;
     /** maps an OID to a schema name*/
     private final Map oidToSchema;
-    /** the monitor for delivering callback events */
-    private SyntaxCheckerRegistryMonitor monitor;
+
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapSyntaxCheckerRegistry bootstrap;
 
@@ -57,7 +56,6 @@
     {
         this.oidToSchema = new HashMap();
         this.syntaxCheckers = new HashMap();
-        this.monitor = new SyntaxCheckerRegistryMonitorAdapter();
 
         this.bootstrap = bootstrap;
         if ( this.bootstrap == null )
@@ -66,18 +64,6 @@
         }
     }
 
-
-    /**
-     * Sets the monitor used by this registry.
-     *
-     * @param monitor the monitor to set for registry event callbacks
-     */
-    public void setMonitor( SyntaxCheckerRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
     // ------------------------------------------------------------------------
     // Service Methods
     // ------------------------------------------------------------------------
@@ -90,13 +76,11 @@
         {
             NamingException e = new NamingException( "SyntaxChecker with OID "
                 + oid + " already registered!" );
-            monitor.registerFailed( oid, syntaxChecker, e );
             throw e;
         }
 
         oidToSchema.put( oid, schema );
         syntaxCheckers.put( oid, syntaxChecker );
-        monitor.registered( oid, syntaxChecker );
     }
 
 
@@ -108,19 +92,16 @@
         if ( syntaxCheckers.containsKey( oid ) )
         {
             c = ( SyntaxChecker ) syntaxCheckers.get( oid );
-            monitor.lookedUp( oid, c );
             return c;
         }
 
         if ( bootstrap.hasSyntaxChecker( oid ) )
         {
             c = bootstrap.lookup( oid );
-            monitor.lookedUp( oid, c );
             return c;
         }
 
         e = new NamingException( "SyntaxChecker not found for OID: " + oid );
-        monitor.lookupFailed( oid, e );
         throw e;
     }
 

Modified: directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java?rev=357554&r1=357553&r2=357554&view=diff
==============================================================================
--- directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java
(original)
+++ directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java
Sun Dec 18 15:25:47 2005
@@ -42,8 +42,7 @@
     private final Map oidToSchema;
     /** the registry used to resolve names to OIDs */
     private final OidRegistry oidRegistry;
-    /** monitor notified via callback events */
-    private SyntaxRegistryMonitor monitor;
+
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapSyntaxRegistry bootstrap;
 
@@ -61,7 +60,6 @@
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
         this.oidRegistry = oidRegistry;
-        this.monitor = new SyntaxRegistryMonitorAdapter();
 
         this.bootstrap = bootstrap;
         if ( this.bootstrap == null )
@@ -70,18 +68,6 @@
         }
     }
 
-
-    /**
-     * Sets the monitor that is to be notified via callback events.
-     *
-     * @param monitor the new monitor to notify of notable events
-     */
-    public void setMonitor( SyntaxRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
     // ------------------------------------------------------------------------
     // Service Methods
     // ------------------------------------------------------------------------
@@ -94,14 +80,12 @@
         {
             NamingException e = new NamingException( "dITContentRule w/ OID " +
                 dITContentRule.getOid() + " has already been registered!" );
-            monitor.registerFailed( dITContentRule, e );
             throw e;
         }
 
         oidRegistry.register( dITContentRule.getName(), dITContentRule.getOid() ) ;
         byOid.put( dITContentRule.getOid(), dITContentRule );
         oidToSchema.put( dITContentRule.getOid(), schema );
-        monitor.registered( dITContentRule );
     }
 
 
@@ -112,20 +96,17 @@
         if ( byOid.containsKey( id ) )
         {
             Syntax dITContentRule = ( Syntax ) byOid.get( id );
-            monitor.lookedUp( dITContentRule );
             return dITContentRule;
         }
 
         if ( bootstrap.hasSyntax( id ) )
         {
             Syntax dITContentRule = bootstrap.lookup( id );
-            monitor.lookedUp( dITContentRule );
             return dITContentRule;
         }
 
         NamingException e = new NamingException( "dITContentRule w/ OID "
             + id + " not registered!" );
-        monitor.lookupFailed( id, e );
         throw e;
     }
 
@@ -173,4 +154,6 @@
         return new JoinIterator( new Iterator[]
             { byOid.values().iterator(),bootstrap.list() } );
     }
+    
+    
 }



Mime
View raw message