You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2008/10/06 19:08:45 UTC

svn commit: r702202 [1/4] - in /felix/trunk/ipojo: ant/src/main/java/org/apache/felix/ipojo/task/ core/src/main/java/org/apache/felix/ipojo/ handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/ handler/eventadmin/src/main/java/org/ap...

Author: clement
Date: Mon Oct  6 10:08:45 2008
New Revision: 702202

URL: http://svn.apache.org/viewvc?rev=702202&view=rev
Log:
A bunch of cosmetic fixes.

Modified:
    felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java
    felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java
    felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/EventUtil.java
    felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherHandler.java
    felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java
    felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/Publisher.java
    felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/PublisherImpl.java
    felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberHandler.java
    felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java
    felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/BundleTracker.java
    felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderManager.java
    felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderModelHandler.java
    felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java
    felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanWRegisterImpl.java
    felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/JMXHandlerDescription.java
    felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/JmxConfigFieldMap.java
    felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/MBeanHandler.java
    felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/MethodField.java
    felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/NotificationField.java
    felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/PropertyField.java
    felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java
    felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalHandler.java
    felix/trunk/ipojo/handler/whiteboard/src/main/java/org/apache/felix/ipojo/handler/wbp/WhiteBoardManager.java
    felix/trunk/ipojo/handler/whiteboard/src/main/java/org/apache/felix/ipojo/handler/wbp/WhiteBoardPatternHandler.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MetadataCollector.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/annotations/MethodCollector.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
    felix/trunk/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java

Modified: felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java (original)
+++ felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java Mon Oct  6 10:08:45 2008
@@ -1,154 +1,154 @@
-/* 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.ipojo.task;
-
-import java.io.File;
-
-import org.apache.felix.ipojo.manipulator.Pojoization;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-
-/**
- * iPOJO Ant Task. This Ant task manipulates an input bundle.
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- */
-public class IPojoTask extends Task {
-    
-    /** Metadata file. */
-    private File m_metadata;
-    
-    /** Input bundle. */
-    private File m_input;
-    
-    /** Output bundle. */
-    private File m_output;
-
-    /** Flag describing if we need to ignore annotation of not. */
-    private boolean m_ignoreAnnotations = false;
-    
-    /**
-     * Set the metadata file.
-     * @param meta : the metadata file.
-     */
-    public void setMetadata(File meta) {
-        m_metadata = meta;
-    }
-    
-    /**
-     * Set the input bundle.
-     * @param in : the input bundle
-     */
-    public void setInput(File in) {
-        m_input = in;
-    }
-    
-    /**
-     * Set the output bundle.
-     * @param out : the output bundle
-     */
-    public void setOutput(File out) {
-        m_output = out;
-    }
-    
-    /**
-     * Set if we need to ignore annotations or not.
-     * @param flag : true if we need to ignore annotations.
-     */
-    public void setIgnoreAnnotations(boolean flag) {
-        m_ignoreAnnotations = flag;
-    }
-    
-    /**
-     * Execute the Ant Task.
-     * @see org.apache.tools.ant.Task#execute()
-     */
-    public void execute() {
-        
-        if (m_input == null) {
-            throw new BuildException("No input bundle specified");
-        }
-        if (!m_input.exists()) {
-            throw new BuildException("The input bundle " + m_input.getAbsolutePath() + " does not exist");
-        }
-        
-        log("Input Bundle File : " + m_input.getAbsolutePath());
-        
-        // Get metadata file
-        if (m_metadata == null) {
-            m_metadata = new File("./metadata.xml");
-            if (!m_metadata.exists()) {
-             // Verify if annotations are ignored
-                if (m_ignoreAnnotations) {
-                    log("No metadata file found & ignore annotations : nothing to do");
-                    return;
-                } else {
-                    log("No metadata file found - try to use only annotations");
-                    m_metadata = null;
-                }
-            } else {
-                log("Metadata File : " + m_metadata.getAbsolutePath());
-            }
-        } else {
-            // Metadata file is specified, check existence
-            if (!m_metadata.exists()) {
-                throw new BuildException("No metadata file found - the file " + m_metadata.getAbsolutePath() + " does not exist");
-            } else {
-                log("Metadata File : " + m_metadata.getAbsolutePath());
-            }
-        }
-
-        log("Start bundle manipulation");
-        
-        if (m_output == null) {
-            m_output = new File("./_out.jar");
-        }
-        
-        if (m_output.exists()) {
-            boolean r = m_output.delete();
-            if (!r) { throw new BuildException("The file " + m_output.getAbsolutePath() + " cannot be deleted"); }
-        }
-        
-        Pojoization pojo = new Pojoization();
-        if (! m_ignoreAnnotations) {
-            pojo.setAnnotationProcessing();
-        }
-        pojo.pojoization(m_input, m_output, m_metadata);
-        for (int i = 0; i < pojo.getWarnings().size(); i++) {
-            log((String) pojo.getWarnings().get(i));
-        }
-        if (pojo.getErrors().size() > 0) { throw new BuildException((String) pojo.getErrors().get(0)); }
-        
-        String out;
-        if (m_output.getName().equals("_out.jar")) {
-            m_input.delete();
-            m_output.renameTo(m_input);
-            out = m_input.getAbsolutePath();
-        } else {
-            out = m_output.getAbsolutePath();
-        }
-        
-        log("Bundle manipulation - SUCCESS");
-        log("Output File : " + out);
-        
-    }
-    
-    
-
-}
-
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.ipojo.task;
+
+import java.io.File;
+
+import org.apache.felix.ipojo.manipulator.Pojoization;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+/**
+ * iPOJO Ant Task. This Ant task manipulates an input bundle.
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class IPojoTask extends Task {
+    
+    /** Metadata file. */
+    private File m_metadata;
+    
+    /** Input bundle. */
+    private File m_input;
+    
+    /** Output bundle. */
+    private File m_output;
+
+    /** Flag describing if we need to ignore annotation of not. */
+    private boolean m_ignoreAnnotations = false;
+    
+    /**
+     * Set the metadata file.
+     * @param meta : the metadata file.
+     */
+    public void setMetadata(File meta) {
+        m_metadata = meta;
+    }
+    
+    /**
+     * Set the input bundle.
+     * @param in : the input bundle
+     */
+    public void setInput(File in) {
+        m_input = in;
+    }
+    
+    /**
+     * Set the output bundle.
+     * @param out : the output bundle
+     */
+    public void setOutput(File out) {
+        m_output = out;
+    }
+    
+    /**
+     * Set if we need to ignore annotations or not.
+     * @param flag : true if we need to ignore annotations.
+     */
+    public void setIgnoreAnnotations(boolean flag) {
+        m_ignoreAnnotations = flag;
+    }
+    
+    /**
+     * Execute the Ant Task.
+     * @see org.apache.tools.ant.Task#execute()
+     */
+    public void execute() {
+        
+        if (m_input == null) {
+            throw new BuildException("No input bundle specified");
+        }
+        if (!m_input.exists()) {
+            throw new BuildException("The input bundle " + m_input.getAbsolutePath() + " does not exist");
+        }
+        
+        log("Input bundle file : " + m_input.getAbsolutePath());
+        
+        // Get metadata file
+        if (m_metadata == null) {
+            m_metadata = new File("./metadata.xml");
+            if (!m_metadata.exists()) {
+             // Verify if annotations are ignored
+                if (m_ignoreAnnotations) {
+                    log("No metadata file found & annotations ignored : nothing to do");
+                    return;
+                } else {
+                    log("No metadata file found - trying to use only annotations");
+                    m_metadata = null;
+                }
+            } else {
+                log("Metadata file : " + m_metadata.getAbsolutePath());
+            }
+        } else {
+            // Metadata file is specified, check existence
+            if (!m_metadata.exists()) {
+                throw new BuildException("No metadata file found - the file " + m_metadata.getAbsolutePath() + " does not exist");
+            } else {
+                log("Metadata file : " + m_metadata.getAbsolutePath());
+            }
+        }
+
+        log("Start bundle manipulation");
+        
+        if (m_output == null) {
+            m_output = new File("./_out.jar");
+        }
+        
+        if (m_output.exists()) {
+            boolean r = m_output.delete();
+            if (!r) { throw new BuildException("The file " + m_output.getAbsolutePath() + " cannot be deleted"); }
+        }
+        
+        Pojoization pojo = new Pojoization();
+        if (! m_ignoreAnnotations) {
+            pojo.setAnnotationProcessing();
+        }
+        pojo.pojoization(m_input, m_output, m_metadata);
+        for (int i = 0; i < pojo.getWarnings().size(); i++) {
+            log((String) pojo.getWarnings().get(i));
+        }
+        if (pojo.getErrors().size() > 0) { throw new BuildException((String) pojo.getErrors().get(0)); }
+        
+        String out;
+        if (m_output.getName().equals("_out.jar")) {
+            m_input.delete();
+            m_output.renameTo(m_input);
+            out = m_input.getAbsolutePath();
+        } else {
+            out = m_output.getAbsolutePath();
+        }
+        
+        log("Bundle manipulation - SUCCESS");
+        log("Output file : " + out);
+        
+    }
+    
+    
+
+}
+

Modified: felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java (original)
+++ felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java Mon Oct  6 10:08:45 2008
@@ -95,7 +95,7 @@
     }
 
     /**
-     * Create a instance manager factory.
+     * Creates a instance manager factory.
      * @param context the bundle context
      * @param element the metadata of the component to create
      * @throws ConfigurationException if element describing the factory is malformed.

Modified: felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/EventUtil.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/EventUtil.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/EventUtil.java (original)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/EventUtil.java Mon Oct  6 10:08:45 2008
@@ -1,68 +1,64 @@
-/* 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.ipojo.handlers.event;
-
-/**
- * Utility methods.
- * 
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- */
-public class EventUtil {
-
-    /**
-     * Test that the given topic match with the given topic pattern.
-     * 
-     * @param topic :
-     *            topic to test.
-     * @param topicPattern :
-     *            topic pattern
-     * @return true if it matches.
-     */
-    public static boolean matches(String topic, String topicPattern) {
-        if (topicPattern.equals("*")) {
-            return true;
-        }
-        int star;
-        if ((star = topicPattern.indexOf("*")) > 0) {
-            return topic.startsWith(topicPattern.substring(0, star - 1));
-        } else {
-            return topic.equals(topicPattern);
-        }
-    }
-
-    /**
-     * Test that the given topic match with the given topic patterns.
-     * 
-     * @param topic :
-     *            topic to test.
-     * @param topicPatterns :
-     *            topic patterns
-     * @return true if it matches.
-     */
-    public static boolean matches(String topic, String[] topicPatterns) {
-        int n = topicPatterns.length;
-        for (int i = 0; i < n; i++) {
-            if (matches(topic, topicPatterns[i])) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.ipojo.handlers.event;
+
+/**
+ * Utility methods.
+ * 
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class EventUtil {
+
+    /**
+     * Tests that the given topic match with the given topic pattern.
+     * 
+     * @param topic the topic to test
+     * @param topicPattern the topic pattern
+     * @return true if it matches.
+     */
+    public static boolean matches(String topic, String topicPattern) {
+        if (topicPattern.equals("*")) {
+            return true;
+        }
+        int star;
+        if ((star = topicPattern.indexOf("*")) > 0) {
+            return topic.startsWith(topicPattern.substring(0, star - 1));
+        } else {
+            return topic.equals(topicPattern);
+        }
+    }
+
+    /**
+     * Tests that the given topic match with the given topic patterns.
+     * 
+     * @param topic the topic to test
+     * @param topicPatterns the topic patterns
+     * @return true if it matches.
+     */
+    public static boolean matches(String topic, String[] topicPatterns) {
+        int n = topicPatterns.length;
+        for (int i = 0; i < n; i++) {
+            if (matches(topic, topicPatterns[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+}

Modified: felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherHandler.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherHandler.java (original)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherHandler.java Mon Oct  6 10:08:45 2008
@@ -42,27 +42,27 @@
 public class EventAdminPublisherHandler extends PrimitiveHandler {
 
     /**
-     * Handler Namespace.
+     * The handler Namespace.
      */
     public static final String NAMESPACE = "org.apache.felix.ipojo.handlers.event.EventAdminHandler";
 
     /**
-     * Names of instance configuration properties.
+     * The names of instance configuration properties.
      */
     public static final String TOPICS_PROPERTY = "event.topics";
 
     /**
-     * Prefix for logged messages.
+     * The prefix for logged messages.
      */
     private static final String LOG_PREFIX = "EVENT ADMIN PUBLISHER HANDLER : ";
 
     /**
-     * The Instance Manager.
+     * The instance manager.
      */
     private InstanceManager m_manager;
 
     /**
-     * The current Event Admin service.
+     * The current EventAdmin service.
      */
     private EventAdmin m_ea;
 
@@ -72,14 +72,11 @@
     private Map m_publishersByField = new Hashtable();
 
     /**
-     * Initialize the component type.
+     * Initializes the component type.
      * 
-     * @param cd :
-     *            component type description to populate.
-     * @param metadata :
-     *            component type metadata.
-     * @throws ConfigurationException :
-     *             metadata are incorrect.
+     * @param cd the component type description to populate
+     * @param metadata the component type metadata
+     * @throws ConfigurationException if the given metadata is incorrect.
      * @see org.apache.felix.ipojo.Handler#initializeComponentFactory(org.apache.felix.ipojo.architecture.ComponentDescription,
      *      org.apache.felix.ipojo.metadata.Element)
      */
@@ -109,7 +106,7 @@
                 EventAdminPublisherMetadata publisherMetadata = new EventAdminPublisherMetadata(
                         publishers[i]);
                 String name = publisherMetadata.getName();
-                info(LOG_PREFIX + "checking publisher " + name);
+                info(LOG_PREFIX + "Checking publisher " + name);
 
                 // Check field existence and type
                 String field = publisherMetadata.getField();
@@ -135,19 +132,16 @@
                 fieldSet.add(field);
             }
         } else {
-            info(LOG_PREFIX + "no publisher to check");
+            info(LOG_PREFIX + "No publisher to check");
         }
     }
 
     /**
      * Constructor.
      * 
-     * @param metadata :
-     *            component type metadata
-     * @param conf :
-     *            instance configuration
-     * @throws ConfigurationException :
-     *             one event publication is not correct
+     * @param metadata the component type metadata
+     * @param conf the instance configuration
+     * @throws ConfigurationException if one event publication is not correct
      * @see org.apache.felix.ipojo.Handler#configure(org.apache.felix.ipojo.InstanceManager,
      *      org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)
      */
@@ -173,7 +167,7 @@
                 EventAdminPublisherMetadata publisherMetadata = new EventAdminPublisherMetadata(
                         publishers[i]);
                 String name = publisherMetadata.getName();
-                info(LOG_PREFIX + "configuring publisher " + name);
+                info(LOG_PREFIX + "Configuring publisher " + name);
 
                 // Get the topic instance configuration if redefined
                 String topicsString = (instanceTopics != null) ? (String) instanceTopics
@@ -204,12 +198,12 @@
                 m_manager.register(fieldMetadata, this);
             }
         } else {
-            info(LOG_PREFIX + "no publisher to configure");
+            info(LOG_PREFIX + "No publisher to configure");
         }
     }
 
     /**
-     * Start the handler instance.
+     * Starts the handler instance.
      * 
      * This method does nothing.
      */
@@ -218,7 +212,7 @@
     }
 
     /**
-     * Stop the handler instance.
+     * Stops the handler instance.
      * 
      * This method does nothing.
      */
@@ -230,12 +224,9 @@
      * Field interceptor callback. This method is called when the component
      * attempt to one of its Publisher field.
      * 
-     * @param pojo
-     *            the accessed field
-     * @param fieldName
-     *            the name of the accessed field
-     * @param value
-     *            the value of the field (useless here)
+     * @param pojo the accessed field
+     * @param fieldName the name of the accessed field
+     * @param value the value of the field (useless here)
      * 
      * @return the Publisher associated with the accessed field's name
      */

Modified: felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java (original)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java Mon Oct  6 10:08:45 2008
@@ -98,13 +98,10 @@
     private final String m_dataKey;
 
     /**
-     * Construct a publisher from its metadata description.
+     * Constructs a publisher from its metadata description.
      * 
-     * @param publisher :
-     *            publisher metadata description.
-     * @throws ConfigurationException
-     *             if the configuration of the component or the instance is
-     *             invalid.
+     * @param publisher the publisher metadata description.
+     * @throws ConfigurationException if the configuration of the component or the instance is invalid.
      */
     public EventAdminPublisherMetadata(Element publisher)
         throws ConfigurationException {
@@ -174,13 +171,10 @@
     }
 
     /**
-     * Set the topics attribute of the publisher.
+     * Sets the topics attribute of the publisher.
      * 
-     * @param topicsString
-     *            the comma separated list of the topics on which events are
-     *            sent
-     * @throws ConfigurationException
-     *             the specified topic string is malformed
+     * @param topicsString the comma separated list of the topics on which events are sent
+     * @throws ConfigurationException the specified topic string is malformed
      */
     public void setTopics(String topicsString)
         throws ConfigurationException {
@@ -199,10 +193,9 @@
     }
 
     /**
-     * Check that the required instance configurable attributes are all set.
+     * Checks that the required instance configurable attributes are all set.
      * 
-     * @throws ConfigurationException
-     *             if a required attribute is missing
+     * @throws ConfigurationException if a required attribute is missing
      */
     public void check()
         throws ConfigurationException {
@@ -214,7 +207,7 @@
     }
 
     /**
-     * Get the name attribute of the publisher.
+     * Gets the name attribute of the publisher.
      * 
      * @return the name
      */
@@ -223,7 +216,7 @@
     }
 
     /**
-     * Get the field attribute of the publisher.
+     * Gets the field attribute of the publisher.
      * 
      * @return the field
      */
@@ -232,7 +225,7 @@
     }
 
     /**
-     * Get the topics attribute of the publisher.
+     * Gets the topics attribute of the publisher.
      * 
      * @return the topics
      */
@@ -241,18 +234,18 @@
     }
 
     /**
-     * Get the synchronous attribute of the publisher.
+     * Gets the synchronous attribute of the publisher.
      * 
-     * @return the synchronous
+     * @return the synchronous mode
      */
     public boolean isSynchronous() {
         return m_synchronous;
     }
 
     /**
-     * Get the dataKey attribute of the publisher.
+     * Gets the dataKey attribute of the publisher.
      * 
-     * @return the dataKey
+     * @return the data key
      */
     public String getDataKey() {
         return m_dataKey;

Modified: felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/Publisher.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/Publisher.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/Publisher.java (original)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/Publisher.java Mon Oct  6 10:08:45 2008
@@ -1,47 +1,45 @@
-/* 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.ipojo.handlers.event.publisher;
-
-import java.util.Dictionary;
-
-/**
- * An Publisher is the interface between the EventAdminPublisherHandler and a
- * component instance. The POJO can send event through the handler by calling a
- * {@code send} method.
- * 
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- */
-public interface Publisher {
-
-    /**
-     * Send an event with the specified content.
-     * 
-     * @param content
-     *            the content of the event
-     */
-    void send(Dictionary content);
-
-    /**
-     * Send a data event.
-     * 
-     * @param o
-     *            the data to send
-     */
-    void sendData(Object o);
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.ipojo.handlers.event.publisher;
+
+import java.util.Dictionary;
+
+/**
+ * An Publisher is the interface between the EventAdminPublisherHandler and a
+ * component instance. The POJO can send event through the handler by calling a
+ * {@code send} method.
+ * 
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public interface Publisher {
+
+    /**
+     * Sends an event with the specified content.
+     * 
+     * @param content the content of the event
+     */
+    void send(Dictionary content);
+
+    /**
+     * Sends a data event.
+     * 
+     * @param o the data to send
+     */
+    void sendData(Object o);
+}

Modified: felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/PublisherImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/PublisherImpl.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/PublisherImpl.java (original)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/PublisherImpl.java Mon Oct  6 10:08:45 2008
@@ -62,19 +62,14 @@
     private final String m_instanceName;
 
     /**
-     * Construct an Publisher with given parameters.
+     * Constructs an Publisher with given parameters.
      * 
-     * @param handler
-     *            the handler that will manage this publisher
-     * @param topics
-     *            the topics on which events are sent
-     * @param synchronous
-     *            the sending mode of events
-     * @param dataKey
-     *            The key, in the content of the event, where user data are
+     * @param handler the handler that will manage this publisher
+     * @param topics the topics on which events are sent
+     * @param synchronous the sending mode of events
+     * @param dataKey The key, in the content of the event, where user data are
      *            stored (may be {@code null})
-     * @param instanceName
-     *            the name of the instance creating this publisher.
+     * @param instanceName the name of the instance creating this publisher.
      */
     public PublisherImpl(EventAdminPublisherHandler handler, String[] topics,
             boolean synchronous, String dataKey, String instanceName) {
@@ -88,10 +83,9 @@
     }
 
     /**
-     * Send an event with the specified content.
+     * Sends an event with the specified content.
      * 
-     * @param content
-     *            the content of the event
+     * @param content the content of the event
      */
     public void send(Dictionary content) {
         // Add instance information in the event
@@ -110,10 +104,9 @@
     }
 
     /**
-     * Send a data event.
+     * Sends a data event.
      * 
-     * @param object
-     *            the data to send
+     * @param object the data to send
      */
     public void sendData(Object object) {
         // Construct the content of the event with the given object

Modified: felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberHandler.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberHandler.java (original)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberHandler.java Mon Oct  6 10:08:45 2008
@@ -52,7 +52,7 @@
         EventHandler {
 
     /**
-     * Handler Namespace.
+     * The handler namespace.
      */
     public static final String NAMESPACE = "org.apache.felix.ipojo.handlers.event.EventAdminHandler";
 
@@ -69,44 +69,41 @@
     public static final String FILTER_PROPERTY = "event.filter";
 
     /**
-     * Prefix for logged messages.
+     * The prefix for logged messages.
      */
     private static final String LOG_PREFIX = "EVENT ADMIN SUBSCRIBER HANDLER : ";
 
     /**
-     * Instance Manager.
+     * The instance manager.
      */
     private InstanceManager m_manager;
 
     /**
-     * List of subscriber accessible by name.
+     * The list of subscriber accessible by name.
      */
     private Map m_subscribersByName = new HashMap();
 
     /**
-     * List of callbacks accessible by subscribers' names.
+     * The list of callbacks accessible by subscribers' names.
      */
     private Map m_callbacksByName = new Hashtable();
 
     /**
-     * iPOJO Properties representing all the topics.
+     * The iPOJO properties representing all the topics.
      */
     private String[] m_topics;
 
     /**
-     * Listen received events ?
+     * Listening to received events ?
      */
     private boolean m_isListening;
 
     /**
-     * Initialize the component type.
+     * Initializes the component type.
      * 
-     * @param cd :
-     *            component type description to populate.
-     * @param metadata :
-     *            component type metadata.
-     * @throws ConfigurationException :
-     *             metadata are incorrect.
+     * @param cd component type description to populate.
+     * @param metadata component type metadata.
+     * @throws ConfigurationException if the metadata are incorrect.
      * @see org.apache.felix.ipojo.Handler#initializeComponentFactory(org.apache.felix.ipojo.architecture.ComponentDescription,
      *      org.apache.felix.ipojo.metadata.Element)
      */
@@ -140,7 +137,7 @@
                         getFactory().getBundleContext(), subscribers[i]);
 
                 String name = subscriberMetadata.getName();
-                info(LOG_PREFIX + "checking subscriber " + name);
+                info(LOG_PREFIX + "Checking subscriber " + name);
 
                 // Determine the event callback prototype
                 PojoMetadata pojoMetadata = getPojoMetadata();
@@ -179,19 +176,16 @@
                 nameSet.add(name);
             }
         } else {
-            info(LOG_PREFIX + "no subscriber to check");
+            info(LOG_PREFIX + "No subscriber to check");
         }
     }
 
     /**
      * Constructor.
      * 
-     * @param metadata :
-     *            component type metadata
-     * @param conf :
-     *            instance configuration
-     * @throws ConfigurationException :
-     *             one event subscription is not correct
+     * @param metadata the omponent type metadata
+     * @param conf the instance configuration
+     * @throws ConfigurationException if one event subscription is not correct
      * @see org.apache.felix.ipojo.Handler#configure(org.apache.felix.ipojo.InstanceManager,
      *      org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)
      */
@@ -221,7 +215,7 @@
                 EventAdminSubscriberMetadata subscriberMetadata = new EventAdminSubscriberMetadata(
                         m_manager.getContext(), subscribers[i]);
                 String name = subscriberMetadata.getName();
-                info(LOG_PREFIX + "configuring subscriber " + name);
+                info(LOG_PREFIX + "Configuring subscriber " + name);
 
                 // Get the topics instance configuration if redefined
                 String topicsString = (instanceTopics != null) ? (String) instanceTopics
@@ -277,7 +271,7 @@
             }
 
         } else {
-            info(LOG_PREFIX + "no subscriber to configure");
+            info(LOG_PREFIX + "No subscriber to configure");
         }
     }
 
@@ -306,10 +300,9 @@
      **************************************************************************/
 
     /**
-     * Receive an event. The event is dispatch to attached subscribers.
+     * Receives an event. The event is dispatch to attached subscribers.
      * 
-     * @param event :
-     *            the received event.
+     * @param event the received event.
      * @see org.osgi.service.event.EventHandler#handleEvent(org.osgi.service.event.Event)
      */
     public void handleEvent(Event event) {

Modified: felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java (original)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java Mon Oct  6 10:08:45 2008
@@ -113,11 +113,9 @@
     /**
      * Constructor.
      * 
-     * @param bundleContext : bundle context of the managed instance.
-     * @param subscriber : subscriber metadata.
-     * @throws ConfigurationException
-     *             if the configuration of the component or the instance is
-     *             invalid.
+     * @param bundleContext the bundle context of the managed instance.
+     * @param subscriber the subscriber metadata.
+     * @throws ConfigurationException if the configuration of the component or the instance is invalid.
      */
     public EventAdminSubscriberMetadata(BundleContext bundleContext,
             Element subscriber)
@@ -200,12 +198,10 @@
     }
 
     /**
-     * Set the topics attribute of the subscriber.
+     * Sets the topics attribute of the subscriber.
      * 
-     * @param topicsString
-     *            the comma separated list of the topics to listen
-     * @throws ConfigurationException
-     *             the specified topic list is malformed
+     * @param topicsString the comma separated list of the topics to listen
+     * @throws ConfigurationException if  the specified topic list is malformed
      */
     public void setTopics(String topicsString)
         throws ConfigurationException {
@@ -223,11 +219,10 @@
     }
 
     /**
-     * Set the filter attribute of the subscriber.
+     * Sets the filter attribute of the subscriber.
      * 
-     * @param filterString
-     *            the string representation of the event filter
-     * @throws ConfigurationException : the LDAP filter is malformed
+     * @param filterString the string representation of the event filter
+     * @throws ConfigurationException if the LDAP filter is malformed
      */
     public void setFilter(String filterString)
         throws ConfigurationException {
@@ -239,10 +234,9 @@
     }
 
     /**
-     * Check that the required instance configurable attributes are all set.
+     * Checks that the required instance configurable attributes are all set.
      * 
-     * @throws ConfigurationException
-     *             if a required attribute is missing
+     * @throws ConfigurationException if a required attribute is missing
      */
     public void check()
         throws ConfigurationException {
@@ -254,7 +248,7 @@
     }
 
     /**
-     * Get the name attribute of the subscriber.
+     * Gets the name attribute of the subscriber.
      * 
      * @return the name
      */
@@ -263,7 +257,7 @@
     }
 
     /**
-     * Get the topics attribute of the subscriber.
+     * Gets the topics attribute of the subscriber.
      * 
      * @return the topics
      */
@@ -272,7 +266,7 @@
     }
 
     /**
-     * Get the callback attribute of the subscriber.
+     * Gets the callback attribute of the subscriber.
      * 
      * @return the callback
      */
@@ -281,7 +275,7 @@
     }
 
     /**
-     * Get the data key attribute of the subscriber.
+     * Gets the data key attribute of the subscriber.
      * 
      * @return the dataKey
      */
@@ -290,7 +284,7 @@
     }
 
     /**
-     * Get the data type attribute of the subscriber.
+     * Gets the data type attribute of the subscriber.
      * 
      * @return the dataType
      */
@@ -299,7 +293,7 @@
     }
 
     /**
-     * Get the filter attribute of the subscriber.
+     * Gets the filter attribute of the subscriber.
      * 
      * @return the filter
      */

Modified: felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/BundleTracker.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/BundleTracker.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/BundleTracker.java (original)
+++ felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/BundleTracker.java Mon Oct  6 10:08:45 2008
@@ -1,154 +1,154 @@
-/* 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.ipojo.handler.extender;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.SynchronousBundleListener;
-
-/**
- * This is a very simple bundle tracker utility class that tracks active
- * bundles. The tracker must be given a bundle context upon creation,
- * which it uses to listen for bundle events. The bundle tracker must be
- * opened to track objects and closed when it is no longer needed. This
- * class is abstract, which means in order to use it you must create a
- * subclass of it. Subclasses must implement the <tt>addedBundle()</tt>
- * and <tt>removedBundle()</tt> methods, which can be used to perform some
- * custom action upon the activation or deactivation of bundles. Since this
- * tracker is quite simple, its concurrency control approach is also
- * simplistic. This means that subclasses should take great care to ensure
- * that their <tt>addedBundle()</tt> and <tt>removedBundle()</tt> methods
- * are very simple and do not do anything to change the state of any bundles.
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- **/
-public abstract class BundleTracker {
-    /**
-     * Set of tracked bundles.
-     */
-    final Set m_bundleSet = new HashSet();
-
-    /**
-     * Bundle context.
-     */
-    final BundleContext m_context;
-
-    /**
-     * Synchronous bundle listener.
-     */
-    final SynchronousBundleListener m_listener;
-
-    /**
-     * Flag indicating if the tracking is open.
-     */
-    boolean m_open;
-
-    /**
-     * Constructs a bundle tracker object that will use the specified
-     * bundle context.
-     * @param context The bundle context to use to track bundles.
-     **/
-    public BundleTracker(BundleContext context) {
-        m_context = context;
-        m_listener = new SynchronousBundleListener() {
-            public void bundleChanged(BundleEvent evt) {
-                synchronized (BundleTracker.this) {
-                    if (!m_open) { return; }
-
-                    if (evt.getType() == BundleEvent.STARTED) {
-                        if (!m_bundleSet.contains(evt.getBundle())) {
-                            m_bundleSet.add(evt.getBundle());
-                            addedBundle(evt.getBundle());
-                        }
-                    } else if (evt.getType() == BundleEvent.STOPPED) {
-                        if (m_bundleSet.contains(evt.getBundle())) {
-                            m_bundleSet.remove(evt.getBundle());
-                            removedBundle(evt.getBundle());
-                        }
-                    }
-                }
-            }
-        };
-    }
-
-    /**
-     * Returns the current set of active bundles.
-     * @return The current set of active bundles.
-     **/
-    public synchronized Bundle[] getBundles() {
-        return (Bundle[]) m_bundleSet.toArray(new Bundle[m_bundleSet.size()]);
-    }
-
-    /**
-     * Call this method to start the tracking of active bundles.
-     **/
-    public synchronized void open() {
-        if (!m_open) {
-            m_open = true;
-
-            m_context.addBundleListener(m_listener);
-
-            Bundle[] bundles = m_context.getBundles();
-            for (int i = 0; i < bundles.length; i++) {
-                if (bundles[i].getState() == Bundle.ACTIVE) {
-                    m_bundleSet.add(bundles[i]);
-                    addedBundle(bundles[i]);
-                }
-            }
-        }
-    }
-
-    /**
-     * Call this method to stop the tracking of active bundles.
-     **/
-    public synchronized void close() {
-        if (m_open) {
-            m_open = false;
-
-            m_context.removeBundleListener(m_listener);
-
-            Bundle[] bundles = (Bundle[]) m_bundleSet.toArray(new Bundle[m_bundleSet.size()]);
-            for (int i = 0; i < bundles.length; i++) {
-                if (m_bundleSet.remove(bundles[i])) {
-                    removedBundle(bundles[i]);
-                }
-            }
-        }
-    }
-
-    /**
-     * Subclasses must implement this method; it can be used to perform
-     * actions upon the activation of a bundle. Subclasses should keep
-     * this method implementation as simple as possible and should not
-     * cause the change in any bundle state to avoid concurrency issues.
-     * @param bundle The bundle being added to the active set.
-     **/
-    protected abstract void addedBundle(Bundle bundle);
-
-    /**
-     * Subclasses must implement this method; it can be used to perform
-     * actions upon the deactivation of a bundle. Subclasses should keep
-     * this method implementation as simple as possible and should not
-     * cause the change in any bundle state to avoid concurrency issues.
-     * @param bundle The bundle being removed from the active set.
-     **/
-    protected abstract void removedBundle(Bundle bundle);
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.ipojo.handler.extender;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.SynchronousBundleListener;
+
+/**
+ * This is a very simple bundle tracker utility class that tracks active
+ * bundles. The tracker must be given a bundle context upon creation,
+ * which it uses to listen for bundle events. The bundle tracker must be
+ * opened to track objects and closed when it is no longer needed. This
+ * class is abstract, which means in order to use it you must create a
+ * subclass of it. Subclasses must implement the <tt>addedBundle()</tt>
+ * and <tt>removedBundle()</tt> methods, which can be used to perform some
+ * custom action upon the activation or deactivation of bundles. Since this
+ * tracker is quite simple, its concurrency control approach is also
+ * simplistic. This means that subclasses should take great care to ensure
+ * that their <tt>addedBundle()</tt> and <tt>removedBundle()</tt> methods
+ * are very simple and do not do anything to change the state of any bundles.
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ **/
+public abstract class BundleTracker {
+    /**
+     * Set of tracked bundles.
+     */
+    final Set m_bundleSet = new HashSet();
+
+    /**
+     * Bundle context.
+     */
+    final BundleContext m_context;
+
+    /**
+     * Synchronous bundle listener.
+     */
+    final SynchronousBundleListener m_listener;
+
+    /**
+     * Flag indicating if the tracking is open.
+     */
+    boolean m_open;
+
+    /**
+     * Constructs a bundle tracker object that will use the specified
+     * bundle context.
+     * @param context the bundle context to use to track bundles.
+     **/
+    public BundleTracker(BundleContext context) {
+        m_context = context;
+        m_listener = new SynchronousBundleListener() {
+            public void bundleChanged(BundleEvent evt) {
+                synchronized (BundleTracker.this) {
+                    if (!m_open) { return; }
+
+                    if (evt.getType() == BundleEvent.STARTED) {
+                        if (!m_bundleSet.contains(evt.getBundle())) {
+                            m_bundleSet.add(evt.getBundle());
+                            addedBundle(evt.getBundle());
+                        }
+                    } else if (evt.getType() == BundleEvent.STOPPED) {
+                        if (m_bundleSet.contains(evt.getBundle())) {
+                            m_bundleSet.remove(evt.getBundle());
+                            removedBundle(evt.getBundle());
+                        }
+                    }
+                }
+            }
+        };
+    }
+
+    /**
+     * Returns the current set of active bundles.
+     * @return the current set of active bundles.
+     **/
+    public synchronized Bundle[] getBundles() {
+        return (Bundle[]) m_bundleSet.toArray(new Bundle[m_bundleSet.size()]);
+    }
+
+    /**
+     * Call this method to start the tracking of active bundles.
+     **/
+    public synchronized void open() {
+        if (!m_open) {
+            m_open = true;
+
+            m_context.addBundleListener(m_listener);
+
+            Bundle[] bundles = m_context.getBundles();
+            for (int i = 0; i < bundles.length; i++) {
+                if (bundles[i].getState() == Bundle.ACTIVE) {
+                    m_bundleSet.add(bundles[i]);
+                    addedBundle(bundles[i]);
+                }
+            }
+        }
+    }
+
+    /**
+     * Call this method to stop the tracking of active bundles.
+     **/
+    public synchronized void close() {
+        if (m_open) {
+            m_open = false;
+
+            m_context.removeBundleListener(m_listener);
+
+            Bundle[] bundles = (Bundle[]) m_bundleSet.toArray(new Bundle[m_bundleSet.size()]);
+            for (int i = 0; i < bundles.length; i++) {
+                if (m_bundleSet.remove(bundles[i])) {
+                    removedBundle(bundles[i]);
+                }
+            }
+        }
+    }
+
+    /**
+     * Subclasses must implement this method; it can be used to perform
+     * actions upon the activation of a bundle. Subclasses should keep
+     * this method implementation as simple as possible and should not
+     * cause the change in any bundle state to avoid concurrency issues.
+     * @param bundle the bundle being added to the active set.
+     **/
+    protected abstract void addedBundle(Bundle bundle);
+
+    /**
+     * Subclasses must implement this method; it can be used to perform
+     * actions upon the deactivation of a bundle. Subclasses should keep
+     * this method implementation as simple as possible and should not
+     * cause the change in any bundle state to avoid concurrency issues.
+     * @param bundle the bundle being removed from the active set.
+     **/
+    protected abstract void removedBundle(Bundle bundle);
+}

Modified: felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderManager.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderManager.java (original)
+++ felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderManager.java Mon Oct  6 10:08:45 2008
@@ -1,135 +1,135 @@
-/* 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.ipojo.handler.extender;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Dictionary;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.felix.ipojo.PrimitiveHandler;
-import org.apache.felix.ipojo.util.Callback;
-import org.osgi.framework.Bundle;
-
-/**
- * Track and manage extensions.
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- */
-public class ExtenderManager extends BundleTracker {
-    
-    /**
-     * Looked extension.
-     */
-    private String m_extension;
-    
-    /**
-     * OnArrival method. 
-     */
-    private Callback m_onArrival;
-    
-    /**
-     * OnDeparture method. 
-     */
-    private Callback m_onDeparture;
-    
-    /**
-     * Attached handler. 
-     */
-    private PrimitiveHandler m_handler;
-    
-    /**
-     * Set of managed bundles.
-     */
-    private Set m_bundles = new HashSet();
-    
-    /**
-     * Constructor.
-     * @param handler : attached handler.
-     * @param extension : looked extension.
-     * @param bind : onArrival method
-     * @param unbind : onDeparture method.
-     */
-    public ExtenderManager(ExtenderModelHandler handler, String extension, String bind, String unbind) {
-        super(handler.getInstanceManager().getContext());
-        m_handler = handler;
-        m_onArrival = new Callback(bind, new Class[] {Bundle.class, String.class}, false, m_handler.getInstanceManager());
-        m_onDeparture = new Callback(unbind, new Class[] {Bundle.class}, false, m_handler.getInstanceManager());
-        m_extension = extension;
-    }
-
-
-    /**
-     * A bundle arrives.
-     * Checks if the bundle match with the looked extension, if so call the arrival callback.
-     * @param bundle : arriving bundle.
-     * @see org.apache.felix.ipojo.handler.extender.BundleTracker#addedBundle(org.osgi.framework.Bundle)
-     */
-    protected void addedBundle(Bundle bundle) {
-        Dictionary headers = bundle.getHeaders();
-        String header = (String) headers.get(m_extension);
-        if (header != null) {
-            synchronized (this) {
-                m_bundles.add(bundle);
-            }
-            try { // Call the callback outside the synchronized block.
-                m_onArrival.call(new Object[] {bundle, header});
-            } catch (NoSuchMethodException e) {
-                m_handler.error("The onArrival method " + m_onArrival.getMethod() + " does not exist in the class", e);
-                m_handler.getInstanceManager().stop();
-            } catch (IllegalAccessException e) {
-                m_handler.error("The onArrival method " + m_onArrival.getMethod() + " cannot be called", e);
-                m_handler.getInstanceManager().stop();
-            } catch (InvocationTargetException e) {
-                m_handler.error("The onArrival method " + m_onArrival.getMethod() + " has thrown an exception", e.getTargetException());
-                m_handler.getInstanceManager().stop();
-            }
-        }
-    }
-
-    /**
-     * A bundle is stopping.
-     * Check if the bundle was managed, if so call the remove departure callback.
-     * @param bundle : leaving bundle.
-     * @see org.apache.felix.ipojo.handler.extender.BundleTracker#removedBundle(org.osgi.framework.Bundle)
-     */
-    protected void removedBundle(Bundle bundle) {
-        boolean contained;
-        synchronized (this) {
-            contained = m_bundles.remove(bundle); // Stack confinement
-        }
-        
-        if (contained) {
-            try {
-                m_onDeparture.call(new Object[] {bundle});
-            } catch (NoSuchMethodException e) {
-                m_handler.error("The onDeparture method " + m_onDeparture.getMethod() + " does not exist in the class", e);
-                m_handler.getInstanceManager().stop();
-            } catch (IllegalAccessException e) {
-                m_handler.error("The onDeparture method " + m_onDeparture.getMethod() + " cannot be called", e);
-                m_handler.getInstanceManager().stop();
-            } catch (InvocationTargetException e) {
-                m_handler.error("The onDeparture method " + m_onDeparture.getMethod() + " has thrown an exception", e.getTargetException());
-                m_handler.getInstanceManager().stop();
-            }
-        }
-    }
-
-    
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.ipojo.handler.extender;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Dictionary;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.felix.ipojo.PrimitiveHandler;
+import org.apache.felix.ipojo.util.Callback;
+import org.osgi.framework.Bundle;
+
+/**
+ * Track and manage extensions.
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class ExtenderManager extends BundleTracker {
+    
+    /**
+     * Looked extension.
+     */
+    private String m_extension;
+    
+    /**
+     * OnArrival method. 
+     */
+    private Callback m_onArrival;
+    
+    /**
+     * OnDeparture method. 
+     */
+    private Callback m_onDeparture;
+    
+    /**
+     * Attached handler. 
+     */
+    private PrimitiveHandler m_handler;
+    
+    /**
+     * Set of managed bundles.
+     */
+    private Set m_bundles = new HashSet();
+    
+    /**
+     * Constructor.
+     * @param handler the attached handler.
+     * @param extension the looked extension.
+     * @param bind the onArrival method
+     * @param unbind the onDeparture method.
+     */
+    public ExtenderManager(ExtenderModelHandler handler, String extension, String bind, String unbind) {
+        super(handler.getInstanceManager().getContext());
+        m_handler = handler;
+        m_onArrival = new Callback(bind, new Class[] {Bundle.class, String.class}, false, m_handler.getInstanceManager());
+        m_onDeparture = new Callback(unbind, new Class[] {Bundle.class}, false, m_handler.getInstanceManager());
+        m_extension = extension;
+    }
+
+
+    /**
+     * A bundle arrives.
+     * Checks if the bundle match with the looked extension, if so call the arrival callback.
+     * @param bundle the arriving bundle.
+     * @see org.apache.felix.ipojo.handler.extender.BundleTracker#addedBundle(org.osgi.framework.Bundle)
+     */
+    protected void addedBundle(Bundle bundle) {
+        Dictionary headers = bundle.getHeaders();
+        String header = (String) headers.get(m_extension);
+        if (header != null) {
+            synchronized (this) {
+                m_bundles.add(bundle);
+            }
+            try { // Call the callback outside the synchronized block.
+                m_onArrival.call(new Object[] {bundle, header});
+            } catch (NoSuchMethodException e) {
+                m_handler.error("The onArrival method " + m_onArrival.getMethod() + " does not exist in the class", e);
+                m_handler.getInstanceManager().stop();
+            } catch (IllegalAccessException e) {
+                m_handler.error("The onArrival method " + m_onArrival.getMethod() + " cannot be called", e);
+                m_handler.getInstanceManager().stop();
+            } catch (InvocationTargetException e) {
+                m_handler.error("The onArrival method " + m_onArrival.getMethod() + " has thrown an exception", e.getTargetException());
+                m_handler.getInstanceManager().stop();
+            }
+        }
+    }
+
+    /**
+     * A bundle is stopping.
+     * Check if the bundle was managed, if so call the remove departure callback.
+     * @param bundle the leaving bundle.
+     * @see org.apache.felix.ipojo.handler.extender.BundleTracker#removedBundle(org.osgi.framework.Bundle)
+     */
+    protected void removedBundle(Bundle bundle) {
+        boolean contained;
+        synchronized (this) {
+            contained = m_bundles.remove(bundle); // Stack confinement
+        }
+        
+        if (contained) {
+            try {
+                m_onDeparture.call(new Object[] {bundle});
+            } catch (NoSuchMethodException e) {
+                m_handler.error("The onDeparture method " + m_onDeparture.getMethod() + " does not exist in the class", e);
+                m_handler.getInstanceManager().stop();
+            } catch (IllegalAccessException e) {
+                m_handler.error("The onDeparture method " + m_onDeparture.getMethod() + " cannot be called", e);
+                m_handler.getInstanceManager().stop();
+            } catch (InvocationTargetException e) {
+                m_handler.error("The onDeparture method " + m_onDeparture.getMethod() + " has thrown an exception", e.getTargetException());
+                m_handler.getInstanceManager().stop();
+            }
+        }
+    }
+
+    
+
+}

Modified: felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderModelHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderModelHandler.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderModelHandler.java (original)
+++ felix/trunk/ipojo/handler/extender/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderModelHandler.java Mon Oct  6 10:08:45 2008
@@ -1,95 +1,95 @@
-/* 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.ipojo.handler.extender;
-
-import java.util.ArrayList;
-import java.util.Dictionary;
-import java.util.List;
-
-import org.apache.felix.ipojo.ConfigurationException;
-import org.apache.felix.ipojo.PrimitiveHandler;
-import org.apache.felix.ipojo.metadata.Element;
-
-/**
- * Handler automating extender pattern. The component using this handler is notified 
- * when an handler with a special manifest extension is detected, the component is notified.
- * When a managed handler leaves, the component is also notified.
- * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
- */
-public class ExtenderModelHandler extends PrimitiveHandler {
-    
-    /**
-     * Handler namespace.
-     */
-    public static final String NAMESPACE = "org.apache.felix.ipojo.extender";
-    
-    /**
-     * Extension manager list.
-     * Immutable once set.
-     */
-    private List m_managers = new ArrayList(1);
-
-    /**
-     * Configure method.
-     * @param elem : component type element.
-     * @param dict : instance configuration.
-     * @throws ConfigurationException : the configuration is not valid.
-     * @see org.apache.felix.ipojo.Handler#configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)
-     */
-    public void configure(Element elem, Dictionary dict) throws ConfigurationException {
-        Element[] elems = elem.getElements("extender", NAMESPACE);
-        for (int i = 0; i < elems.length; i++) {
-            String extension = elems[i].getAttribute("extension");
-            String onArrival = elems[i].getAttribute("onArrival");
-            String onDeparture = elems[i].getAttribute("onDeparture");
-            
-            if (extension == null) {
-                throw new ConfigurationException("The extender element requires an 'extender' attribute");
-            }
-            if (onArrival == null || onDeparture == null) {
-                throw new ConfigurationException("The extender element requires the onArrival and onDeparture attributes");
-            }
-            
-            ExtenderManager wbm = new ExtenderManager(this, extension, onArrival, onDeparture);
-            m_managers.add(wbm);
-        }
-        
-    }
-
-    /**
-     * Start the handler.
-     * @see org.apache.felix.ipojo.Handler#start()
-     */
-    public void start() {
-        for (int i = 0; i < m_managers.size(); i++) {
-            ((ExtenderManager) m_managers.get(i)).open();
-        }
-    }
-
-    /**
-     * Stop the handler.
-     * @see org.apache.felix.ipojo.Handler#stop()
-     */
-    public void stop() {
-        for (int i = 0; i < m_managers.size(); i++) {
-            ((ExtenderManager) m_managers.get(i)).close();
-        } 
-    }
-
-}
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.ipojo.handler.extender;
+
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.List;
+
+import org.apache.felix.ipojo.ConfigurationException;
+import org.apache.felix.ipojo.PrimitiveHandler;
+import org.apache.felix.ipojo.metadata.Element;
+
+/**
+ * Handler automating extender pattern. The component using this handler is notified 
+ * when an handler with a special manifest extension is detected, the component is notified.
+ * When a managed handler leaves, the component is also notified.
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class ExtenderModelHandler extends PrimitiveHandler {
+    
+    /**
+     * The handler namespace.
+     */
+    public static final String NAMESPACE = "org.apache.felix.ipojo.extender";
+    
+    /**
+     * The extension manager list.
+     * Immutable once set.
+     */
+    private List m_managers = new ArrayList(1);
+
+    /**
+     * Configures the handler.
+     * @param elem the component type element.
+     * @param dict the instance configuration.
+     * @throws ConfigurationException if the configuration is not valid.
+     * @see org.apache.felix.ipojo.Handler#configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)
+     */
+    public void configure(Element elem, Dictionary dict) throws ConfigurationException {
+        Element[] elems = elem.getElements("extender", NAMESPACE);
+        for (int i = 0; i < elems.length; i++) {
+            String extension = elems[i].getAttribute("extension");
+            String onArrival = elems[i].getAttribute("onArrival");
+            String onDeparture = elems[i].getAttribute("onDeparture");
+            
+            if (extension == null) {
+                throw new ConfigurationException("The extender element requires an 'extender' attribute");
+            }
+            if (onArrival == null || onDeparture == null) {
+                throw new ConfigurationException("The extender element requires the 'onArrival' and 'onDeparture' attributes");
+            }
+            
+            ExtenderManager wbm = new ExtenderManager(this, extension, onArrival, onDeparture);
+            m_managers.add(wbm);
+        }
+        
+    }
+
+    /**
+     * Starts the handler.
+     * @see org.apache.felix.ipojo.Handler#start()
+     */
+    public void start() {
+        for (int i = 0; i < m_managers.size(); i++) {
+            ((ExtenderManager) m_managers.get(i)).open();
+        }
+    }
+
+    /**
+     * Stops the handler.
+     * @see org.apache.felix.ipojo.Handler#stop()
+     */
+    public void stop() {
+        for (int i = 0; i < m_managers.size(); i++) {
+            ((ExtenderManager) m_managers.get(i)).close();
+        } 
+    }
+
+}

Modified: felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java?rev=702202&r1=702201&r2=702202&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java (original)
+++ felix/trunk/ipojo/handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/DynamicMBeanImpl.java Mon Oct  6 10:08:45 2008
@@ -54,37 +54,35 @@
         DynamicMBean {
 
     /**
-     * InstanceManager: use to store the InstanceManager instance.
+     * The instance manager. Used to store the InstanceManager instance.
      */
     protected final InstanceManager m_instanceManager;
 
     /**
-     * JmxConfigDFieldMap : store the data extracted from metadata.xml.
+     * The JmxConfigDFieldMap. Stors the data extracted from metadata.xml.
      */
     private JmxConfigFieldMap m_configMap;
 
     /**
-     * MBeanInfo : class wich store the MBean Informations.
+     * The MBeanInfo. The class storing the MBean Informations.
      */
     private MBeanInfo m_mBeanInfo;
 
     /**
-     * String : constant which store the name of the class.
+     * The class name. Constant storing the name of the class.
      */
     private String m_className = this.getClass().getName();
 
     /**
-     * sequenceNumber : use to calculate unique id to notification.
+     * The sequence number. Used to calculate unique id to notification.
      */
     private int m_sequenceNumber = 0;
 
     /**
-     * DynamicMBeanImpl : constructor.
+     * Constructor.
      * 
-     * @param properties
-     *            : data extracted from metadat.xml file
-     * @param instanceManager
-     *            : InstanceManager instance
+     * @param properties the data extracted from metadat.xml file
+     * @param instanceManager the InstanceManager instance
      */
     public DynamicMBeanImpl(JmxConfigFieldMap properties,
             InstanceManager instanceManager) {
@@ -94,16 +92,12 @@
     }
 
     /**
-     * getAttribute implements from JMX. get the value of the required attribute
+     * Gets the value of the required attribute.
      * 
-     * @param arg0
-     *            name of required attribute
-     * @throws AttributeNotFoundException
-     *             : if the attribute doesn't exist
-     * @throws MBeanException
-     *             :
-     * @throws ReflectionException
-     *             :
+     * @param arg0 the name of required attribute
+     * @throws AttributeNotFoundException if the attribute doesn't exist
+     * @throws MBeanException if something bad occures
+     * @throws ReflectionException if something bad occures
      * @return the object attribute
      */
     public Object getAttribute(String arg0) throws AttributeNotFoundException,
@@ -118,10 +112,9 @@
     }
 
     /**
-     * getAttributes : implement from JMX. get values of reuqired attributes
+     * Gets values of required attributes.
      * 
-     * @param attributeNames
-     *            : names of the required attributes
+     * @param attributeNames the names of the required attributes
      * @return return the list of the attribute
      */
     public AttributeList getAttributes(String[] attributeNames) {
@@ -145,7 +138,7 @@
     }
 
     /**
-     * getMBeanInfo : return the MBean Class builded.
+     * Returns the MBean Class builded.
      * 
      * @return return MBeanInfo class constructed by buildMBeanInfo
      */
@@ -154,19 +147,14 @@
     }
 
     /**
-     * invoke : invoke the required method on the targeted POJO.
+     * Invokes the required method on the targeted POJO.
      * 
-     * @param operationName
-     *            : name of the method called
-     * @param params
-     *            : parameters given to the method
-     * @param signature
-     *            : determine which method called
-     * @return Object : the object return by the method
-     * @throws MBeanException
-     *             :
-     * @throws ReflectionException
-     *             :
+     * @param operationName the name of the method called
+     * @param params the parameters given to the method
+     * @param signature the determine which method called
+     * @return the object return by the method
+     * @throws MBeanException if something bad occures
+     * @throws ReflectionException if something bad occures
      */
     public Object invoke(String operationName, Object[] params,
             String[] signature) throws MBeanException, ReflectionException {
@@ -198,18 +186,13 @@
     }
 
     /**
-     * setAttribute : change specified attribute value.
+     * Changes specified attribute value.
      * 
-     * @param attribute
-     *            : attribute with new value to be changed
-     * @throws AttributeNotFoundException
-     *             : if the requiered attribute was not found
-     * @throws InvalidAttributeValueException
-     *             : the value is inccorrect type
-     * @throws MBeanException
-     *             :
-     * @throws ReflectionException
-     *             :
+     * @param attribute the attribute with new value to be changed
+     * @throws AttributeNotFoundException if the required attribute was not found
+     * @throws InvalidAttributeValueException if the value is inccorrect type
+     * @throws MBeanException if something bad occures
+     * @throws ReflectionException if something bad occures
      */
     public void setAttribute(Attribute attribute)
         throws AttributeNotFoundException, InvalidAttributeValueException,
@@ -243,7 +226,7 @@
         }
         if (!propertyField.isWritable()) {
             throw new InvalidAttributeValueException("Attribute " + name
-                    + " can not be setted");
+                    + " can not be set");
         }
 
         if (value == null) {
@@ -270,11 +253,10 @@
     }
 
     /**
-     * setAttributes : change all the attributes value.
+     * Changes all the attributes value.
      * 
-     * @param attributes
-     *            : list of attribute value to be changed
-     * @return AttributeList : list of new attribute
+     * @param attributes the list of attribute value to be changed
+     * @return the list of new attribute
      */
     public AttributeList setAttributes(AttributeList attributes) {
 
@@ -308,8 +290,8 @@
     }
 
     /**
-     * buildMBeanInfo : build the MBean information on initialization. this
-     * value don't change after
+     * Builds the MBean information on initialization. This
+     * value doesn't change further.
      */
     private void buildMBeanInfo() {
         String dDescription = m_configMap.getDecription();
@@ -379,10 +361,9 @@
     }
 
     /**
-     * getNotificationInfo : get the notification informations (use by JMX).
+     * Gets the notification informations (use by JMX).
      * 
-     * @return MBeanNotificationInfo[] : structure which describe the
-     *         notifications
+     * @return the structure which describe the notifications
      */
     public MBeanNotificationInfo[] getNotificationInfo() {
         MBeanNotificationInfo[] dNotification = new MBeanNotificationInfo[0];
@@ -404,18 +385,13 @@
     }
 
     /**
-     * sendNotification : send a notification to a subscriver.
+     * Sends a notification to a subscriber.
      * 
-     * @param msg
-     *            : msg to send
-     * @param attributeName
-     *            : name of the attribute
-     * @param attributeType
-     *            : type of the attribute
-     * @param oldValue
-     *            : oldvalue of the attribute
-     * @param newValue
-     *            : new value of the attribute
+     * @param msg the msg to send
+     * @param attributeName the name of the attribute
+     * @param attributeType the type of the attribute
+     * @param oldValue the old value of the attribute
+     * @param newValue the new value of the attribute
      */
     public void sendNotification(String msg, String attributeName,
             String attributeType, Object oldValue, Object newValue) {