You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Marco Tedone <mt...@jemos.org> on 2003/05/11 19:11:53 UTC

Retrieving more than a condition in a Matcher

Hi, I'm going trough the Matcher architecture and I saw that a 'parameter'
could be passed as a condition with '=' to get in the init() method. Is it
possible to pass more than a parameter to a Matcher?

I'm thinking to create an Abstract class to subclass with different
implementation subclasses, depending on user's preferences, for istance to
specify the configuration method (XML, JNDI, LDAP) and a string pointing to
a path to retrieve some resources. With only one parameter it couldn't be
possible.

Any idea?

Marco




---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


RE: Retrieving more than a condition in a Matcher

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Hi, I'm going trough the Matcher architecture and I saw that a 'parameter'
> could be passed as a condition with '=' to get in the init() method. Is it
> possible to pass more than a parameter to a Matcher?

Not in Mailet API v2.  There are proposals to change that for Mailet API v3,
but no one has stepped up to do the work.

See:
http://nagoya.apache.org/wiki/apachewiki.cgi?JamesV3/MailetConfiguration

Actually, matcher and mailet configuration has been discussed *extensively*.
You should review the archives.  I can tell you that the proposal to open up
Mailet configuration to full XML has been largely rejected, at least within
config.xml.

When we last heard from Aaron Knauf, he felt that the JNDI proposals would
address the complex configuration needs that he had felt required full XML
support.  His approach was to populate a JNDI (sub-)context with the complex
configuration information required by a mailet, and to then make that
available by "[supplying] the name of this context to the Mailet via an init
param."

> With only one parameter it couldn't be possible.

Even without the proposed changes, you could pass a URL that can be used to
access the configuration information.  The scheme would tell the code what
to do with it.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org