public ServiceListGeneratorServlet(DestinationRegistry destinationRegistry, Bus bus) { this.destinationRegistry = destinationRegistry; this.bus = bus; if (this.bus == null) { this.bus = BusFactory.getDefaultBus(false); } this.title = "CXF - Service list"; }
public void destroyBus() { if (bus != null) { bus.shutdown(true); bus = null; } }
protected void configure(Bus bus, Object bean, String name, String extraName) { Configurer configurer = bus.getExtension(Configurer.class); if (null != configurer) { configurer.configureBean(name, bean); if (extraName != null) { configurer.configureBean(extraName, bean); } } }
/** * JAX-WS section 9.3.1: The runtime MUST then carry out any injections * requested by the handler, typically via the javax .annotation.Resource * annotation. After all the injections have been carried out, including in * the case where no injections were requested, the runtime MUST invoke the * method carrying a javax.annotation .PostConstruct annotation, if present. */ private void configHandler(Handler<?> handler) { if (handler != null) { ResourceManager resourceManager = bus.getExtension(ResourceManager.class); ResourceInjector injector = new ResourceInjector(resourceManager); injector.inject(handler); injector.construct(handler); } } }
protected HTTPConduitFactory findFactory(EndpointInfo endpointInfo, Bus bus) { HTTPConduitFactory f = endpointInfo.getProperty(HTTPConduitFactory.class.getName(), HTTPConduitFactory.class); if (f == null) { f = bus.getExtension(HTTPConduitFactory.class); } return f; } public Destination getDestination(EndpointInfo endpointInfo, Bus bus) throws IOException {
@Resource public final void setBus(Bus b) { bus = b; if (bus != null && bus.getExtension(ResourceManager.class) != null) { bus.getExtension(ResourceManager.class).addResourceResolver(this); } }
public FormattedServiceListWriter(String styleSheetPath, String title, boolean showForeignContexts, Bus bus) { this.styleSheetPath = styleSheetPath; this.title = title; this.showForeignContexts = showForeignContexts; this.bus = bus; if (this.bus != null) { this.atomMap = CastUtils.cast((Map<?, ?>)this.bus.getProperty("org.apache.cxf.extensions.logging.atom.pull")); } }
protected ClassLoader initClassLoader() { return bus.getExtension(ClassLoader.class); }
public HTTPWSDLExtensionLoader(Bus b) { WSDLManager manager = b.getExtension(WSDLManager.class); createExtensor(manager, javax.wsdl.Port.class, org.apache.cxf.transports.http.configuration.HTTPClientPolicy.class); createExtensor(manager, javax.wsdl.Port.class, org.apache.cxf.transports.http.configuration.HTTPServerPolicy.class); createExtensor(manager, javax.wsdl.Port.class, AddressType.class); } public void createExtensor(WSDLManager manager,
protected void loadBus(ServletConfig sc) { this.bus = BusFactory.newInstance().createBus(); }
public EndpointImpl(Object implementor) { this(BusFactory.getThreadDefaultBus(), implementor); }
/** * Create a new instance using a default <tt>Bus</tt>. * * @return the new instance * @see CXFBusFactory#getDefaultBus() */ public static JaxWsDynamicClientFactory newInstance() { Bus bus = BusFactory.getThreadDefaultBus(); return new JaxWsDynamicClientFactory(bus); } }
private void configureObject(String name, Object instance) { Configurer configurer = bus.getExtension(Configurer.class); if (null != configurer) { configurer.configureBean(name, instance); } }
private void initConfig() { cproviderFactory = bus.getExtension(ContinuationProviderFactory.class); }
private Bus getServletBus() { try { if (shadowCxfServlet == null) { // no servlet going on. Just launch. return BusFactory.getDefaultBus(true); } return (Bus) servletGetBusMethod.invoke(shadowCxfServlet); } catch (Exception e) { // CXF internally inconsistent? throw new RuntimeException(e); } }
public void destroyBus() { bus.shutdown(true); }
private void configureObject(Object instance) { Configurer configurer = bus.getExtension(Configurer.class); if (null != configurer) { configurer.configureBean(instance); } }