commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mika Goeckel" <>
Subject Self configuring Objects or is it possible to change the rule set during the parse phase?
Date Wed, 12 Dec 2001 23:35:58 GMT

Is it possible to add rules to the ruleset of a digester after the parse has been started?

The reason for that is, that it would enable us to put the knowledge about child objects within
something like a configure() method of a just created object.

For example if someone creates a complicated valve with subobjects in tomcat, the knowledge
that a valve needs to be created is for example in org.apache.catalina.startup.ContextRuleset.

Now if someone needs a Valve with subobjects configured via digester he/she has to change
the ContextRuleset class.

If it would be possible to call a configure method on the specific implementation of a class,
it could itself add the rules for childs.

A class could implement a ProvideRules interface defined in the digester package to let the
digester know that it wants to provide additional rules.

Comments please?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message