You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2012/07/25 03:47:58 UTC
svn commit: r1365397 - in
/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main:
java/org/apache/servicemix/cxfbc/ resources/OSGI-INF/blueprint/
Author: ffang
Date: Wed Jul 25 01:47:57 2012
New Revision: 1365397
URL: http://svn.apache.org/viewvc?rev=1365397&view=rev
Log:
[SMXCOMP-938]introduce a showAllServices property for CxfBcComponent
Modified:
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml
Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java?rev=1365397&r1=1365396&r2=1365397&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcComponent.java Wed Jul 25 01:47:57 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/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=1365397&r1=1365396&r2=1365397&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java Wed Jul 25 01:47:57 2012
@@ -389,7 +389,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/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java?rev=1365397&r1=1365396&r2=1365397&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/ListServiceHandler.java Wed Jul 25 01:47:57 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/trunk/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml?rev=1365397&r1=1365396&r2=1365397&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/resources/OSGI-INF/blueprint/servicemix-cxf-bc.xml Wed Jul 25 01:47:57 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>