Author: asoldano
Date: 2015-04-02 04:59:25 -0400 (Thu, 02 Apr 2015)
New Revision: 19611
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/AbstractHTTPConduitFactoryWrapper.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DefaultHTTPConduitFactoryWrapper.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java
Log:
[JBWS-3901] Refactoring
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/AbstractHTTPConduitFactoryWrapper.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/AbstractHTTPConduitFactoryWrapper.java 2015-04-01
20:33:19 UTC (rev 19610)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/AbstractHTTPConduitFactoryWrapper.java 2015-04-02
08:59:25 UTC (rev 19611)
@@ -40,19 +40,13 @@
*/
public abstract class AbstractHTTPConduitFactoryWrapper implements HTTPConduitFactory
{
- private HTTPConduitFactory delegate;
+ private final HTTPConduitFactory delegate;
- /**
- * Installs the current wrapper in the specified Bus instance.
- *
- * @param bus The Bus instance to install the wrapper in
- */
- public void install(Bus bus)
+ public AbstractHTTPConduitFactoryWrapper(HTTPConduitFactory delegate)
{
- delegate = bus.getExtension(HTTPConduitFactory.class);
- bus.setExtension(this, HTTPConduitFactory.class);
+ this.delegate = delegate;
}
-
+
@Override
public HTTPConduit createConduit(HTTPTransportFactory f, Bus b, EndpointInfo
localInfo, EndpointReferenceType target)
throws IOException
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DefaultHTTPConduitFactoryWrapper.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DefaultHTTPConduitFactoryWrapper.java 2015-04-01
20:33:19 UTC (rev 19610)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DefaultHTTPConduitFactoryWrapper.java 2015-04-02
08:59:25 UTC (rev 19611)
@@ -31,6 +31,7 @@
import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.service.model.EndpointInfo;
import org.apache.cxf.transport.http.HTTPConduit;
+import org.apache.cxf.transport.http.HTTPConduitFactory;
import org.apache.cxf.transport.http.HTTPTransportFactory;
import org.apache.cxf.transport.http.URLConnectionHTTPConduit;
import org.apache.cxf.transports.http.configuration.ConnectionType;
@@ -61,13 +62,15 @@
private final Map<String, Object> configuration;
- public DefaultHTTPConduitFactoryWrapper()
+ public DefaultHTTPConduitFactoryWrapper(HTTPConduitFactory delegate)
{
+ super(delegate);
this.configuration = defaultConfiguration;
}
- public DefaultHTTPConduitFactoryWrapper(Map<String, Object> configuration,
boolean useSystemDefault)
+ public DefaultHTTPConduitFactoryWrapper(Map<String, Object> configuration,
boolean useSystemDefault, HTTPConduitFactory delegate)
{
+ super(delegate);
if (configuration == null) {
throw new IllegalArgumentException();
}
@@ -157,4 +160,10 @@
}
}
}
+
+ public static void install(Bus bus)
+ {
+ HTTPConduitFactory delegate = bus.getExtension(HTTPConduitFactory.class);
+ bus.setExtension(new DefaultHTTPConduitFactoryWrapper(delegate),
HTTPConduitFactory.class);
+ }
}
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java 2015-04-01
20:33:19 UTC (rev 19610)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java 2015-04-02
08:59:25 UTC (rev 19611)
@@ -60,7 +60,7 @@
initializeBus(bus);
bus.initialize();
- new DefaultHTTPConduitFactoryWrapper().install(bus);
+ DefaultHTTPConduitFactoryWrapper.install(bus);
return bus;
}
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java 2015-04-01
20:33:19 UTC (rev 19610)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java 2015-04-02
08:59:25 UTC (rev 19611)
@@ -113,7 +113,7 @@
registerAppContextLifeCycleListener(bus, bac);
- new DefaultHTTPConduitFactoryWrapper().install(bus);
+ DefaultHTTPConduitFactoryWrapper.install(bus);
return bus;
}
Show replies by date