Hi Andy
- At the moment the log events are embedded inside feeds, [...] it would
make sense to let users choose that a single Atom entry
Agree, can be done easily as next strategy (converter class) so user has
full control of pair of format (converter) and batch size. I have to take a
look on AtomPub spec, I am still new to Atom stuff ;)
It may make sense to have a single WebDeliverer but initialized with both AtomFeed and AtomEntry providers, and if the Element is an
instance of Entry then it will set the type to be application/atom+xml;type=entry...
Perhaps we can default to an 'entry' if the batch size = 1, so that users can avoid specifying converter classes...I kind of like
the idea of letting users to specify, if possible, non-class-specific properties, but letting them to name individual converters can
be useful too...
<snip/>
- It would be nice to let users easily inject customized WebClients (ex,
preferring JSON or set with some additional headers, etc)
from Spring, but it may actually be quite easy to do, they'll have to
reconfigure a WebDeliverer bean and possibly list a default
retrier bean ?
You can do it now on Spring XML confing level (without annotations so far),
more or less like this:
<bean id="wc" class="...WebClient" ... />
<bean id="wcd" class="...ext.logging.atom.WebClientDeliverer">
<constructor-arg><ref bean="wc" /><constructor-arg>
</bean>
<bean class="...ext.logging.atom.AtomPushBean">
<property name="deliverer"><ref bean="wcd"></property>
...
</bean>
This looks fine ...
I can imagine more tricky but for me dirty way (it is NOT DONE so far);
WebClientDeliverer used by default may have injected field like this:
@Resource("atom-deliverer") WebClient webclient;
and use it if injected by spring. This way one may simply define bean with
this hardcoded name and it is picked up wiring AtomPushBean, e.g.:
<bean id="atom-deliverer" class="...WebClient" ... />
<bean class="...ext.logging.atom.AtomPushBean" .. />
<!-- deliverer not customized here -->
</bean>
I agree, probably does not make sense,
<bean id="wcd" class="...ext.logging.atom.WebClientDeliverer">
<constructor-arg><ref bean="wc" /><constructor-arg>
</bean>
is not too difficult
thanks
Sergey
Thanks for your thoughts Sergey,
cheers, andy.
--
View this message in context:
http://old.nabble.com/-New-feature--Logging-in-ATOM-Feeds-and-pushing-to-client-tp26452485p26476716.html
Sent from the cxf-user mailing list archive at Nabble.com.