Hi Fred, Not sure if I understand your question correctly. If what you want is to instantiate and install interceptors per service/endpoint/binding, for example, you may have a strategy that can load different interceptors depending on a specific binding property, yes surely you can do this. SoapBindingFactory.java shows how SOAP binding specific interceptors are loaded.
Cheers, Jervis > -----Original Message----- > From: Fred Dushin [mailto:[EMAIL PROTECTED] > Sent: 2007?3?21? 5:02 > To: [email protected]; [email protected] > Subject: Programatically installing interceptors per > (Bus|Service|Endpoint) > > > I understand that CXF provides APIs for installed interceptors > through the InterceptorProvider interface, which the Bus, Endpoint, > and Service types all extend (among other types). > > Suppose I want to create, via configuration, some sort of CXF plugin > (I hesitate to call this an interceptor, for reasons which should > become obvious). The purpose of this plugin is to install > interceptors programatically into the call chain. > > I can see how to do this using a reference to a Bus -- e.g., I can > spring-load the plugin I want to install, and wire it up to the Bus > -- common pattern. And from there, I can get access to the > Bus-level > InterceptorProvider, since the Bus extends that type. > > That would work in the case where I want my plugin to install these > interceptors globally, i.e, for all services and endpoints in > a Bus; > however, suppose I want to install my interceptors at a finer level > of granularity, e.g., per endpoint. Is there a way for my plugin, > which seems to be loaded at Bus initialization time, to get a handle > on the Service or Endpoint (which also implement > InterceptorProvider) > for which it is (or counterfactually would be) configured? Is this > an envisioned pattern? Or is there some other sort of interceptor I > don't know of, e.g, which hooks into Service or Endpoint creation? > > Thanks! > -Fred >
