use of org.apache.cxf.transport.http.blueprint.HttpBPHandler in project cxf by apache.
the class HTTPTransportActivator method start.
public void start(final BundleContext context) throws Exception {
ConfigAdminHttpConduitConfigurer conduitConfigurer = new ConfigAdminHttpConduitConfigurer();
registerService(context, ManagedServiceFactory.class, conduitConfigurer, ConfigAdminHttpConduitConfigurer.FACTORY_PID);
registerService(context, HTTPConduitConfigurer.class, conduitConfigurer, "org.apache.cxf.http.conduit-configurer");
if (PropertyUtils.isTrue(context.getProperty(DISABLE_DEFAULT_HTTP_TRANSPORT))) {
// directly in the CXF_CONFIG_SCOPE properties file
return;
}
DestinationRegistry destinationRegistry = new DestinationRegistryImpl();
HTTPTransportFactory transportFactory = new HTTPTransportFactory(destinationRegistry);
HttpServiceTrackerCust customizer = new HttpServiceTrackerCust(destinationRegistry, context);
httpServiceTracker = new ServiceTracker<>(context, HttpService.class, customizer);
httpServiceTracker.open();
context.registerService(DestinationRegistry.class.getName(), destinationRegistry, null);
context.registerService(HTTPTransportFactory.class.getName(), transportFactory, null);
BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory() {
@Override
public Object createNamespaceHandler() {
return new HttpBPHandler();
}
};
NamespaceHandlerRegisterer.register(context, factory, "http://cxf.apache.org/transports/http/configuration");
}
Aggregations