servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1365408 - in /servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main: java/org/apache/servicemix/cxfbc/ resources/OSGI-INF/blueprint/
Date Wed, 25 Jul 2012 02:29:55 GMT
Author: ffang
Date: Wed Jul 25 02:29:55 2012
New Revision: 1365408

URL: http://svn.apache.org/viewvc?rev=1365408&view=rev
Log:
[SMXCOMP-938]introduce a showAllServices property for CxfBcComponent

Modified:
    servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
    servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
    servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
    servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml

Modified: servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
URL: http://svn.apache.org/viewvc/servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java?rev=1365408&r1=1365407&r2=1365408&view=diff
==============================================================================
--- servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
(original)
+++ servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
Wed Jul 25 02:29:55 2012
@@ -40,6 +40,8 @@ public class CxfBcComponent extends Defa
 
     private String busCfg;
     
+    private boolean showAllServices = false;
+    
     private CxfBcConfiguration configuration = new CxfBcConfiguration();
     
     /**
@@ -165,4 +167,12 @@ public class CxfBcComponent extends Defa
         this.configuration.setAuthenticationService(authenticationService);
     }
 
+    public boolean isShowAllServices() {
+        return showAllServices;
+    }
+
+    public void setShowAllServices(boolean showAllServices) {
+        this.showAllServices = showAllServices;
+    }
+
 }

Modified: servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=1365408&r1=1365407&r2=1365408&view=diff
==============================================================================
--- servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
(original)
+++ servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Wed Jul 25 02:29:55 2012
@@ -387,7 +387,8 @@ public class CxfBcConsumer extends Consu
                 handlers = new ArrayList<Handler>();
                 jettyEng.setHandlers(handlers);
             }
-            handlers.add(new ListServiceHandler(((CxfBcComponent) getServiceUnit().getComponent()).getAllBuses()));
+            handlers.add(new ListServiceHandler(((CxfBcComponent) getServiceUnit().getComponent()).getAllBuses(),
+                                                (CxfBcComponent) getServiceUnit().getComponent()));
         }
     }
 

Modified: servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
URL: http://svn.apache.org/viewvc/servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java?rev=1365408&r1=1365407&r2=1365408&view=diff
==============================================================================
--- servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
(original)
+++ servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
Wed Jul 25 02:29:55 2012
@@ -45,11 +45,17 @@ public class ListServiceHandler extends 
 
 
     private Map<String, Bus> allBuses;
+    private CxfBcComponent cxfBcComponent;
     
     public ListServiceHandler(Map<String, Bus> allBuses) {
         this.allBuses = allBuses;
     }
     
+    public ListServiceHandler(Map<String, Bus> allBuses, CxfBcComponent cxfBcComponent)
{
+        this.allBuses = allBuses;
+        this.cxfBcComponent = cxfBcComponent;
+    }
+    
     public void handle(String target, HttpServletRequest request,
             HttpServletResponse response, int dispatch) throws IOException,
             ServletException {
@@ -89,7 +95,9 @@ public class ListServiceHandler extends 
         for (Iterator<Server> iter = servers.iterator(); iter.hasNext();) {
             Server server = (Server) iter.next();
             JettyHTTPDestination jhd = (JettyHTTPDestination)server.getDestination();
-            if (((JettyHTTPServerEngine)jhd.getEngine()).getPort() != serverPort) {
+            if (cxfBcComponent != null
+                && !cxfBcComponent.isShowAllServices() 
+                && ((JettyHTTPServerEngine)jhd.getEngine()).getPort() != serverPort)
{
                 continue;
             }
             String address = jhd.getAddress().getAddress().getValue();

Modified: servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml
URL: http://svn.apache.org/viewvc/servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml?rev=1365408&r1=1365407&r2=1365408&view=diff
==============================================================================
--- servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml
(original)
+++ servicemix/components/branches/components-2011.02.x/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml
Wed Jul 25 02:29:55 2012
@@ -28,6 +28,7 @@
         <property name="configuration" ref="servicemix-cxfbc-configuration" />
         <property name="authenticationService" ref="authenticationService" />
         <property name="executorFactory" ref="executorFactory" />
+        <property name="showAllServices" value="${showAllServices}"/>
     </bean>
    
     <bean id="servicemix-cxfbc-configuration" class="org.apache.servicemix.cxfbc.CxfBcConfiguration">
@@ -82,6 +83,7 @@
             <cm:property name="threadPoolMaximumPoolSize" value="32"/>
             <cm:property name="threadPoolQueueSize" value="256"/>
             <cm:property name="busCfg" value=""/>
+            <cm:property name="showAllServices" value="false"/>
         </cm:default-properties>
     </cm:property-placeholder>
     



Mime
View raw message