cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Michalec <andrzej.micha...@gmail.com>
Subject How to introduce configuration for low-level class?
Date Sun, 24 Oct 2010 19:28:42 GMT

Hi guys,
after discussion with Sergey, I started looking on advanced URI template
specification that could be interesting alternative for current
implementation (http://tools.ietf.org/html/draft-gregorio-uritemplate-04). I
am talking about alternative since extending current implementation is not
possible due to massive differences in semantics. Having different
implementations it would be good to be able to configure them per endpoint.

What I am looking for is your help in determining how to manage this kind of
configuration. Usually config is defined on high-level and is passed down.
For example using JAXRSServerFactoryBean configuration of endpoint is done
with properties e.g. 'endpoint.put("org.apache.cxf.jaxrs.comparator",...)'
which can be extracted then like this:
'message.getExchange().get(Endpoint.class).get("org.apache.cxf.jaxrs.comparator");'.
However URITemplate class is more core/low-level and does not depend on bus.
How should I make URITemplate class aware of configuration per-endpoint? Is
the only option to extract this configuration from bus, so we need to make
URITemplate factory method(s) aware of Messages?

At the moment I am going to refactor current URITemplate implementation
keeping default behavior unchanged as much as possible - extraction of super
interface will not be straightforward, there are places spread over the code
where URITemplate objects are directly constructed (by c-tor) while in other
places using static factory methods. Then I will introduce temporary
configuration e.g. global property "org.apache.cxf.jaxrs.uriTemplateClass"
without endpoints distinction. After all, with your help, template
implementation will be configured in per-endpoint in proper manner.

cheers,
-andy.
-- 
View this message in context: http://cxf.547215.n5.nabble.com/How-to-introduce-configuration-for-low-level-class-tp3234606p3234606.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Mime
View raw message