cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Programmatic config of features in the Bus
Date Wed, 15 Sep 2010 13:35:30 GMT
On Wednesday 15 September 2010 8:37:05 am Alessio Soldano wrote:
>   On 09/15/2010 10:56 AM, Alessio Soldano wrote:
> >  Hi Folks,
> > 
> > looking at the org.apache.cxf.Bus interface, I see there's no way to
> > set features there. The getFeatures() /
> > setFeatures(Collection<AbstractFeature> features) methods are only in
> > the CXFBusImpl implementation. Is there a design reason behind this?
> Replying to myself... probably because users can just create an instance
> of the desired feature and register that to the bus the other way by
> calling the initialize(..) methods coming in AbstractFeature.
> Sorry for the noise.

To give you a bit of a context:

The features on the bus are only applied when the Bus starts up in it's 
postConstruct stuff.   Thus, once started, anything added/removed to the 
feature list would pretty much be ignored.   That's why the methods were not 
exposed.  Technically, once started, the contents of the list could be 
completely discarded.

If we wanted to support a public API for adding features like that, it would 
need to actually apply the feature on the add.  Not sure what could be done 
for a remove.

Daniel Kulp

View raw message