Provide some setters for the AsyncConduitFactory
@@ -51,12 +51,17 @@ public class AsyncHttpTransportFactory extends AbstractTransportFactory implemen
URI_PREFIXES.add("hc://");
}
- private final AsyncHTTPConduitFactory factory = new AsyncHTTPConduitFactory();
+ private AsyncHTTPConduitFactory factory = new AsyncHTTPConduitFactory();
public AsyncHttpTransportFactory() {
super(DEFAULT_NAMESPACES);
}
+
+ public void setAsyncHTTPConduitFactory(AsyncHTTPConduitFactory f) {
+ factory = f;
+ }
+
/**
* This call is used by CXF ExtensionManager to inject the activationNamespaces
* @param ans The transport ids.
@@ -104,7 +109,11 @@ public class AsyncHttpTransportFactory extends AbstractTransportFactory implemen
// need to updated the endpointInfo
endpointInfo.setAddress(getAddress(endpointInfo));
- conduit = factory.createConduit(bus, endpointInfo, target);
+ AsyncHTTPConduitFactory fact = bus.getExtension(AsyncHTTPConduitFactory.class);
+ if (fact == null) {
+ fact = factory;
+ }
+ conduit = fact.createConduit(bus, endpointInfo, target);
// Spring configure the conduit.
String address = conduit.getAddress();
