cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amic...@apache.org
Subject svn commit: r1486383 - in /cxf/dosgi/trunk: discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ dsw/cxf-topology-manager/src/main/java/org/apache/cxf/do...
Date Sat, 25 May 2013 23:20:40 GMT
Author: amichai
Date: Sat May 25 23:20:40 2013
New Revision: 1486383

URL: http://svn.apache.org/r1486383
Log:
Fix various logs, docs, typos, styles

Modified:
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointRepository.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/rsatracker/RemoteServiceAdminTracker.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/test/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImportTest.java

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
Sat May 25 23:20:40 2013
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Tracks interest in EndpointListeners. Delegates to InterfaceMonitorManager to manage 
- * interest in the scopes of each EndpointListener
+ * interest in the scopes of each EndpointListener.
  */
 public class EndpointListenerTrackerCustomizer implements ServiceTrackerCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(EndpointListenerTrackerCustomizer.class);
@@ -61,7 +61,7 @@ public class EndpointListenerTrackerCust
                 LOG.debug("modifiedService: property: " + key + " => " + sref.getProperty(key));
             }
         }
-        
+
         String[] scopes = Util.getScopes(sref);
         for (String scope : scopes) {
             String objClass = getObjectClass(scope);

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitorManager.java
Sat May 25 23:20:40 2013
@@ -76,7 +76,7 @@ public class InterfaceMonitorManager {
                 }
 
                 if (interest.im != null) {
-                    // close old Monitor
+                    // close old InterfaceMonitor
                     interest.im.close();
                     interest.im = null;
                 }
@@ -159,12 +159,12 @@ public class InterfaceMonitorManager {
                 if (matches(currentScope, epd)) {
                     LOG.debug("Matched {} against {}", epd, currentScope);
                     if (isAdded) {
-                        LOG.info("calling EndpointListener.endpointAdded: " + epl + "from
bundle "
-                                + sref.getBundle().getSymbolicName() + " for endpoint: "
+ epd);
+                        LOG.info("calling EndpointListener.endpointAdded: " + epl + " from
bundle "
+                            + sref.getBundle().getSymbolicName() + " for endpoint: " + epd);
                         epl.endpointAdded(epd, currentScope);
                     } else {
-                        LOG.info("calling EndpointListener.endpointRemoved: " + epl + "from
bundle "
-                                + sref.getBundle().getSymbolicName() + " for endpoint: "
+ epd);
+                        LOG.info("calling EndpointListener.endpointRemoved: " + epl + " from
bundle "
+                            + sref.getBundle().getSymbolicName() + " for endpoint: " + epd);
                         epl.endpointRemoved(epd, currentScope);
                     }
                     break;
@@ -179,7 +179,7 @@ public class InterfaceMonitorManager {
             Dictionary<String, Object> dict = mapToDictionary(epd.getProperties());
             return f.match(dict);
         } catch (InvalidSyntaxException e) {
-            LOG.error("Currentscope [" + scope + "] resulted in" + " a bad filter!", e);
+            LOG.error("Scope [" + scope + "] resulted in an invalid filter!", e);
             return false;
         }
     }

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
Sat May 25 23:20:40 2013
@@ -77,7 +77,7 @@ public class PublishingEndpointListener 
     }
 
     public void endpointAdded(EndpointDescription endpoint, String matchedFilter) {
-        LOG.info("Local endpointDescription added: " + endpoint);
+        LOG.info("Local EndpointDescription added: " + endpoint);
 
         if (closed) {
             return;
@@ -118,7 +118,7 @@ public class PublishingEndpointListener 
     }
 
     public void endpointRemoved(EndpointDescription endpoint, String matchedFilter) {
-        LOG.info("Local endpointDescription removed: " + endpoint);
+        LOG.info("Local EndpointDescription removed: " + endpoint);
 
         if (closed) {
             return;
@@ -131,7 +131,6 @@ public class PublishingEndpointListener 
 
             try {
                 removeEndpoint(endpoint);
-
                 endpoints.remove(endpoint);
             } catch (Exception ex) {
                 LOG.error("Exception while processing the removal of a ServicePublication.",
ex);
@@ -140,8 +139,8 @@ public class PublishingEndpointListener 
 
     }
 
-    private void removeEndpoint(EndpointDescription endpoint) throws UnknownHostException,
-        URISyntaxException, InterruptedException, KeeperException {
+    private void removeEndpoint(EndpointDescription endpoint) throws UnknownHostException,
URISyntaxException,
+                                                                     InterruptedException,
KeeperException {
         Collection<String> interfaces = endpoint.getInterfaces();
         String endpointKey = getKey(endpoint.getId());
 

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListenerFactory.java
Sat May 25 23:20:40 2013
@@ -35,7 +35,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Creates local Endpointlisteners that publish to Zookeeper 
+ * Creates local EndpointListeners that publish to Zookeeper.
  */
 public class PublishingEndpointListenerFactory implements ServiceFactory {
     public static final String DISCOVERY_ZOOKEEPER_ID = "org.apache.cxf.dosgi.discovery.zookeeper";

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
Sat May 25 23:20:40 2013
@@ -66,7 +66,7 @@ public class EventProducer {
                 for (ServiceReference sref : listenerRefs) {
                     RemoteServiceAdminListener rsal = (RemoteServiceAdminListener)bctx.getService(sref);
                     if (LOG.isDebugEnabled()) {
-                        LOG.debug("notify RemoteServiceAdminListener {} of bundle {}" + rsal,
+                        LOG.debug("notify RemoteServiceAdminListener {} of bundle {}", rsal,
                                   sref.getBundle().getSymbolicName());
                     }
                     rsal.remoteAdminEvent(rsae);

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointListenerNotifier.java
Sat May 25 23:20:40 2013
@@ -36,7 +36,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Tracks EndpointListeners and allows to notify them of endpoints
+ * Tracks EndpointListeners and allows to notify them of endpoints.
  */
 public class EndpointListenerNotifier {
     private static final String ENDPOINT_LISTENER_FILTER =
@@ -94,10 +94,10 @@ public class EndpointListenerNotifier {
     }
     
     /**
-     * Notifies the listener if he is interested in the provided registrations
+     * Notifies the listener if he is interested in the provided registrations.
      * 
-     * @param sref The ServiceReference for an EndpointListener
-     * @param endpoints the registrations, the listener should be informed about
+     * @param epListenerReference the ServiceReference for an EndpointListener
+     * @param endpoints the registrations the listener should be informed about
      */
     private void notifyListenerOfAdding(ServiceReference epListenerReference,
                                         Collection<EndpointDescription> endpoints)
{
@@ -111,11 +111,10 @@ public class EndpointListenerNotifier {
                 epl.endpointAdded(endpoint, filter.toString());
             }
         }
-
     }
 
     void notifyListenerOfRemoval(ServiceReference epListenerReference,
-                                          Collection<EndpointDescription> endpoints)
{
+                                 Collection<EndpointDescription> endpoints) {
         EndpointListener epl = (EndpointListener)bctx.getService(epListenerReference);
         List<Filter> filters = getFiltersFromEndpointListenerScope(epListenerReference,
bctx);
         for (EndpointDescription endpoint : endpoints) {
@@ -171,9 +170,9 @@ public class EndpointListenerNotifier {
     }
    
     /**
-     * Retrieve endpoint properties as Dictionary
+     * Retrieves an endpoint's properties as a Dictionary.
      * 
-     * @param ep
+     * @param ep an endpoint description
      * @return endpoint properties (will never return null) 
      */
     private Dictionary<String, Object> getEndpointProperties(EndpointDescription ep)
{

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointRepository.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointRepository.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointRepository.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/EndpointRepository.java
Sat May 25 23:20:40 2013
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Holds all endpoints that are exported by a TopologyManager. For each ServiceReference
that is exported a
  * map is maintained which contains information on the endpoints for each RemoteAdminService
that created the
- * endpoints
+ * endpoints.
  */
 class EndpointRepository {
     private static final Logger LOG = LoggerFactory.getLogger(EndpointRepository.class);
@@ -44,9 +44,9 @@ class EndpointRepository {
         = new LinkedHashMap<ServiceReference, Map<RemoteServiceAdmin, Collection<EndpointDescription>>>();
 
     /**
-     * Remove all services exported by the given rsa and notify listeners
+     * Remove all services exported by the given rsa.
      * 
-     * @param rsa
+     * @param rsa the RemoteServiceAdmin to remove
      * @return list of removed endpoints
      */
     synchronized List<EndpointDescription> removeRemoteServiceAdmin(RemoteServiceAdmin
rsa) {

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
Sat May 25 23:20:40 2013
@@ -106,8 +106,6 @@ public class TopologyManagerExport {
                 }
             }
         };
-
-        
     }
     
     /**
@@ -160,13 +158,11 @@ public class TopologyManagerExport {
         }
     }
 
-    private void exportServiceUsingRemoteServiceAdmin(
-                                                      final ServiceReference sref,
+    private void exportServiceUsingRemoteServiceAdmin(final ServiceReference sref,
                                                       final RemoteServiceAdmin remoteServiceAdmin)
{
         // TODO: additional parameter Map ?
         LOG.debug("exporting ...");
-        Collection<ExportRegistration> exportRegs = remoteServiceAdmin
-            .exportService(sref, null);
+        Collection<ExportRegistration> exportRegs = remoteServiceAdmin.exportService(sref,
null);
         List<EndpointDescription> endpoints = new ArrayList<EndpointDescription>();
         if (exportRegs == null) {
             // TODO export failed -> What should be done here?
@@ -175,15 +171,16 @@ public class TopologyManagerExport {
             for (ExportRegistration exportReg : exportRegs) {
                 endpoints.add(getExportedEndpoint(exportReg));
             }
-            LOG.info("TopologyManager: export sucessful Endpoints: {}", endpoints);
+            LOG.info("TopologyManager: export successful Endpoints: {}", endpoints);
             epListenerNotifier.nofifyEndpointListenersOfAdding(endpoints);
         }
         endpointRepo.addEndpoints(sref, remoteServiceAdmin, endpoints);
     }
 
     /**
-     * Retrieve exported Endpoint while handling null
-     * @param exReg
+     * Retrieves an exported Endpoint (while safely handling nulls).
+     *
+     * @param exReg an export registration
      * @return exported Endpoint or null if not present
      */
     private EndpointDescription getExportedEndpoint(ExportRegistration exReg) {

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
Sat May 25 23:20:40 2013
@@ -30,7 +30,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Manages an EndpointListener add adjusts its scope according to requested service filters
+ * Manages an EndpointListener and adjusts its scope according to requested service filters.
  */
 public class EndpointListenerManager {
 
@@ -59,7 +59,7 @@ public class EndpointListenerManager {
         if (filter == null) {
             return;
         }
-        LOG.debug("EndpointListenxtending scope by {}", filter);
+        LOG.debug("EndpointListener: extending scope by {}", filter);
         synchronized (filters) {
             filters.add(filter);
         }

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/rsatracker/RemoteServiceAdminTracker.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/rsatracker/RemoteServiceAdminTracker.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/rsatracker/RemoteServiceAdminTracker.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/rsatracker/RemoteServiceAdminTracker.java
Sat May 25 23:20:40 2013
@@ -37,7 +37,7 @@ public class RemoteServiceAdminTracker e
         super(bc, RemoteServiceAdmin.class.getName(), null);
         this.listeners = new ArrayList<RemoteServiceAdminLifeCycleListener>();
     }
-    
+
     public void addListener(RemoteServiceAdminLifeCycleListener listener) {
         listeners.add(listener);
     }

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/test/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImportTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/test/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImportTest.java?rev=1486383&r1=1486382&r2=1486383&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/test/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImportTest.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/test/java/org/apache/cxf/dosgi/topologymanager/importer/TopologyManagerImportTest.java
Sat May 25 23:20:40 2013
@@ -55,7 +55,7 @@ public class TopologyManagerImportTest {
         BundleContext bc = c.createMock(BundleContext.class);
         RemoteServiceAdminTracker rsaTracker = c.createMock(RemoteServiceAdminTracker.class);
         ServiceRegistration sreg = c.createMock(ServiceRegistration.class);
-        EasyMock.expect(bc.registerService((String)EasyMock.anyObject(), 
+        EasyMock.expect(bc.registerService((String)EasyMock.anyObject(),
                                            EasyMock.anyObject(), 
                                            (Dictionary)EasyMock.anyObject())).andReturn(sreg).anyTimes();
         



Mime
View raw message