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 Mark Imel <mi...@imelshire.com> on 2003/02/13 22:12:36 UTC
Obtaining a reference to a mailet
When my custom mailet/matcher pair are instantiated and initialized, is there a way for my mailet to obtain a reference to the mailet?
And, if not at initialization time, can i obtain a reference at run time?
Thanks,
--Mark Imel
RE: Obtaining a reference to a mailet
Posted by "Noel J. Bergman" <no...@devtech.com>.
Aaron,
> To clarify for Mark - the mailet would not be required to provide the
> error message for invalid commands. I would still be possible for the
> mailet to completely ignore the message with the invalid command (i.e.
> do not modify the message state in any way) and have it actioned by the
> next mailet in the chain - as if it had not been matched at all.
Sometime for v2 we ought to rationalize the bounce processing.
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
Re: Obtaining a reference to a mailet
Posted by Aaron Knauf <ak...@xtra.co.nz>.
Noel J. Bergman wrote:
>>If I were you, I would only use the matcher to determine
>>whether or not the message is intended for the list serv.
>>
>>
<snip...>
> That way the mailet can respond with
>an error message if the command is not understood.
>
>
To clarify for Mark - the mailet would not be required to provide the
error message for invalid commands. I would still be possible for the
mailet to completely ignore the message with the invalid command (i.e.
do not modify the message state in any way) and have it actioned by the
next mailet in the chain - as if it had not been matched at all.
Cheers
ADK
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
RE: Obtaining a reference to a mailet
Posted by "Noel J. Bergman" <no...@devtech.com>.
> If I were you, I would only use the matcher to determine
> whether or not the message is intended for the list serv.
I agree with your assessment, Aaron. His matcher should simply parse the
local-part, and decide if it fits the *pattern* for a command, rather than
whether or not it is a proper command. That way the mailet can respond with
an error message if the command is not understood.
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
Re: Obtaining a reference to a mailet
Posted by Aaron Knauf <ak...@xtra.co.nz>.
Mark Imel wrote:
>I'm working on a List Serv that is more extensible/customizable then the
>reference implementation provided with James. One of the features i've
>added, is the ability to plugin new commands to the list serv manager.
>
>
<snip>
>I wanted to enable the matcher to not have to guess about the currently
>registered commands. But, the commands are currently registered with the
>list serv manager, and there wasn't an easy way that i could see to inform
>the matcher about the specific commands that the list serv manager
>understands.
>
>As a result, i centralized the command lookup mechanism is in the list serv
>manager, and i have the list serv matcher delegate to the list serv manager
>to see if the incoming mail has a valid command. Based on the lookup to the
>list serv manager, the matcher will return a true or false appropriately.
>
>
As far as I can see, you are trying to have the matcher determine
whether or not a given command is valid, before passing it on to the
list serv manager mailet. The more I think about it, the more a think
that you probably don't need to do this anyway. If I were you, I would
only use the matcher to determine whether or not the message is intended
for the list serv. If it is, the list serv can then figure out whether
the command is valid. (This will let the list serv send back a useful
error message in the event that a command is specified incorrectly.)
This approach fits in nicely with the "information expert" pattern for
assignment of responsibilities. "Assign the responsibility to the ...
class that has the information necessary to fulfill the responsibility".
It also highlights the reason that this pattern exists. Obtaining the
necessary information from your command registry is simple when you
/are/ the command registry.
I am not sure how you are specifying your list serv commands, but it
doesn't matter too much. Assuming that they are in one of the usual
places (e.g. subject, recipient user, etc. ) you should be able to match
list serv messages with one of the standard matchers.
Cheers
ADK
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
Re: Obtaining a reference to a mailet
Posted by Mark Imel <mi...@imelshire.com>.
I like your idea about maintaining the commands in a Listserv registry.
And if i have unique commands, on a per/listserv basis, the registry can be
smart enough to lookup the commands associated with the appropriate
listserv.
Its coming along well. I'm putting it into 'production' on my site this
weekend, but it's not ready for submittal yet...
I haven't added the apache copyright headers, and i'll need to update my
coding style.
Hopefully next week i can submit it for early review.
One more thing, i making use of regular expressions in a couple of places,
but i'm doing so with the java 1.4 package. Is that a *bad* thing? I know
there is the Jakart ORO package (i'm not yet familiar with it), but that
would also require another external 3rd party lib...
Do you have any suggestions for these types of situations?
Thanks
----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Friday, February 14, 2003 2:33 PM
Subject: RE: Obtaining a reference to a mailet
> Mark,
>
> In other words, each time you add a new command to the commandmap for the
> Listserv mailet, you want the matcher to understand it. They are coupled
by
> definition.
>
> You do accomplish this in several manners. Yes, you could use the
> MailetContext. But on the other hand, since these all need to be at least
> subclasses of a known Listserv class, you could maintain the registry in
the
> Listserv class. Perhaps something like:
>
> public static Collection getCommands(String listname);
>
> That supports both per-instance maps and a single map. If you just have a
> single command map, then you can ignore the listname parameter, e.g.,
>
> public static Set getCommands(String listname)
> {
> return Collections.unmodifiableSet(commandMap.keySet());
> }
>
> Thoughts?
>
> How is the list server coming? Are you close enough that you'd want to
> upload it, and let others help contribute?
>
> --- Noel
>
> -----Original Message-----
> From: Mark Imel [mailto:james@imelshire.com]
> Sent: Friday, February 14, 2003 16:41
> To: James Developers List
> Subject: Re: Obtaining a reference to a mailet
>
>
> That's a very fair question.
> First i'll say that my solution was following Noel's idea of putting the
> reference on the MailetContext and then lazily obtaining the reference as
> needed.
>
> However, back to your question: Why couple these decoupled objects
(Matcher
> and a Mailet)?
>
> I'm working on a List Serv that is more extensible/customizable then the
> reference implementation provided with James. One of the features i've
> added, is the ability to plugin new commands to the list serv manager.
>
> This enables the list serv manager (a Generic Mailet) to delegate to
> listserv command handlers when handling new list commands like (info, faq,
> subscribe-confirm, etc...)
>
> I wanted to enable the matcher to not have to guess about the currently
> registered commands. But, the commands are currently registered with the
> list serv manager, and there wasn't an easy way that i could see to inform
> the matcher about the specific commands that the list serv manager
> understands.
>
> As a result, i centralized the command lookup mechanism is in the list
serv
> manager, and i have the list serv matcher delegate to the list serv
manager
> to see if the incoming mail has a valid command. Based on the lookup to
the
> list serv manager, the matcher will return a true or false appropriately.
>
> This is my first project with james, so i'd wouldn't be at all surprised
to
> find that there are more appropriate ways to pass configuration
information
> on to a Matcher.
>
> Regards,
> --mark imel
>
>
> ----- Original Message -----
> From: "Aaron Knauf" <ak...@xtra.co.nz>
> To: "James Developers List" <ja...@jakarta.apache.org>
> Sent: Friday, February 14, 2003 1:29 PM
> Subject: Re: Obtaining a reference to a mailet
>
> > This thread worries me. Mailets and Matchers are completely decoupled,
> > at the moment. Giving a Matcher a reference to its Mailet (or vice
> > versa) will lead to the coupling of the two. We will end up with
> > Mailets that only work with a particuler Matcher.
> >
> > What is the benefit that you are after? Is it really worth making this
> > sacrifice for? Isn't there another way to achieve it?
> >
> > ADK
> >
> > Danny Angus wrote:
> >
> > >No,
> > >Although this whole area is the subject of change at the moment.
> > >
> > >d.
> > >
> > >>-----Original Message-----
> > >>From: Mark Imel [mailto:james@imelshire.com]
> > >>Sent: 14 February 2003 00:29
> > >>To: James Developers List
> > >>Subject: Re: Obtaining a reference to a mailet
> > >>
> > >>You're correct my question is weird. I should have double checked.
> > >>I meant to say: Is there a way that my *matcher* can obtain a
reference
> > >>to its coupled mailet?
> > >>
> > >>Sorry about the typo...
> > >>
> > >>----- Original Message -----
> > >>From: "Kenny Smith" <ja...@journalscape.com>
> > >>To: "James Developers List" <ja...@jakarta.apache.org>
> > >>Sent: Thursday, February 13, 2003 1:51 PM
> > >>Subject: Re: Obtaining a reference to a mailet
> > >>
> > >>>Hi Mark,
> > >>>
> > >>>The question seems weird... basic Java (all objects, not just
mailets)
> > >>>gives you a 'this' reference which is a reference to your object from
> > >>>within... maybe you're asking a different question?
> > >>>
> > >>>Kenny Smith
> > >>>
> > >>>Mark Imel wrote:
> > >>>
> > >>>>When my custom mailet/matcher pair are instantiated and initialized,
> > >>>>is there a way for my mailet to obtain a reference to the mailet?
> > >>>>
> > >>>>And, if not at initialization time, can i obtain a reference at run
> > >>>>time?
> > >>
> > >>>>Thanks,
> > >>>>--Mark Imel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
RE: Obtaining a reference to a mailet
Posted by "Noel J. Bergman" <no...@devtech.com>.
Mark,
In other words, each time you add a new command to the commandmap for the
Listserv mailet, you want the matcher to understand it. They are coupled by
definition.
You do accomplish this in several manners. Yes, you could use the
MailetContext. But on the other hand, since these all need to be at least
subclasses of a known Listserv class, you could maintain the registry in the
Listserv class. Perhaps something like:
public static Collection getCommands(String listname);
That supports both per-instance maps and a single map. If you just have a
single command map, then you can ignore the listname parameter, e.g.,
public static Set getCommands(String listname)
{
return Collections.unmodifiableSet(commandMap.keySet());
}
Thoughts?
How is the list server coming? Are you close enough that you'd want to
upload it, and let others help contribute?
--- Noel
-----Original Message-----
From: Mark Imel [mailto:james@imelshire.com]
Sent: Friday, February 14, 2003 16:41
To: James Developers List
Subject: Re: Obtaining a reference to a mailet
That's a very fair question.
First i'll say that my solution was following Noel's idea of putting the
reference on the MailetContext and then lazily obtaining the reference as
needed.
However, back to your question: Why couple these decoupled objects (Matcher
and a Mailet)?
I'm working on a List Serv that is more extensible/customizable then the
reference implementation provided with James. One of the features i've
added, is the ability to plugin new commands to the list serv manager.
This enables the list serv manager (a Generic Mailet) to delegate to
listserv command handlers when handling new list commands like (info, faq,
subscribe-confirm, etc...)
I wanted to enable the matcher to not have to guess about the currently
registered commands. But, the commands are currently registered with the
list serv manager, and there wasn't an easy way that i could see to inform
the matcher about the specific commands that the list serv manager
understands.
As a result, i centralized the command lookup mechanism is in the list serv
manager, and i have the list serv matcher delegate to the list serv manager
to see if the incoming mail has a valid command. Based on the lookup to the
list serv manager, the matcher will return a true or false appropriately.
This is my first project with james, so i'd wouldn't be at all surprised to
find that there are more appropriate ways to pass configuration information
on to a Matcher.
Regards,
--mark imel
----- Original Message -----
From: "Aaron Knauf" <ak...@xtra.co.nz>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Friday, February 14, 2003 1:29 PM
Subject: Re: Obtaining a reference to a mailet
> This thread worries me. Mailets and Matchers are completely decoupled,
> at the moment. Giving a Matcher a reference to its Mailet (or vice
> versa) will lead to the coupling of the two. We will end up with
> Mailets that only work with a particuler Matcher.
>
> What is the benefit that you are after? Is it really worth making this
> sacrifice for? Isn't there another way to achieve it?
>
> ADK
>
> Danny Angus wrote:
>
> >No,
> >Although this whole area is the subject of change at the moment.
> >
> >d.
> >
> >>-----Original Message-----
> >>From: Mark Imel [mailto:james@imelshire.com]
> >>Sent: 14 February 2003 00:29
> >>To: James Developers List
> >>Subject: Re: Obtaining a reference to a mailet
> >>
> >>You're correct my question is weird. I should have double checked.
> >>I meant to say: Is there a way that my *matcher* can obtain a reference
> >>to its coupled mailet?
> >>
> >>Sorry about the typo...
> >>
> >>----- Original Message -----
> >>From: "Kenny Smith" <ja...@journalscape.com>
> >>To: "James Developers List" <ja...@jakarta.apache.org>
> >>Sent: Thursday, February 13, 2003 1:51 PM
> >>Subject: Re: Obtaining a reference to a mailet
> >>
> >>>Hi Mark,
> >>>
> >>>The question seems weird... basic Java (all objects, not just mailets)
> >>>gives you a 'this' reference which is a reference to your object from
> >>>within... maybe you're asking a different question?
> >>>
> >>>Kenny Smith
> >>>
> >>>Mark Imel wrote:
> >>>
> >>>>When my custom mailet/matcher pair are instantiated and initialized,
> >>>>is there a way for my mailet to obtain a reference to the mailet?
> >>>>
> >>>>And, if not at initialization time, can i obtain a reference at run
> >>>>time?
> >>
> >>>>Thanks,
> >>>>--Mark Imel
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
Re: Obtaining a reference to a mailet
Posted by Mark Imel <ja...@imelshire.com>.
That's a very fair question.
First i'll say that my solution was following Noel's idea of putting the
reference on the MailetContext and then lazily obtaining the reference as
needed.
However, back to your question: Why couple these decoupled objects (Matcher
and a Mailet)?
I'm working on a List Serv that is more extensible/customizable then the
reference implementation provided with James. One of the features i've
added, is the ability to plugin new commands to the list serv manager.
This enables the list serv manager (a Generic Mailet) to delegate to
listserv command handlers when handling new list commands like (info, faq,
subscribe-confirm, etc...)
I wanted to enable the matcher to not have to guess about the currently
registered commands. But, the commands are currently registered with the
list serv manager, and there wasn't an easy way that i could see to inform
the matcher about the specific commands that the list serv manager
understands.
As a result, i centralized the command lookup mechanism is in the list serv
manager, and i have the list serv matcher delegate to the list serv manager
to see if the incoming mail has a valid command. Based on the lookup to the
list serv manager, the matcher will return a true or false appropriately.
This is my first project with james, so i'd wouldn't be at all surprised to
find that there are more appropriate ways to pass configuration information
on to a Matcher.
Regards,
--mark imel
----- Original Message -----
From: "Aaron Knauf" <ak...@xtra.co.nz>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Friday, February 14, 2003 1:29 PM
Subject: Re: Obtaining a reference to a mailet
> This thread worries me. Mailets and Matchers are completely decoupled,
> at the moment. Giving a Matcher a reference to its Mailet (or vice
> versa) will lead to the coupling of the two. We will end up with
> Mailets that only work with a particuler Matcher.
>
> What is the benefit that you are after? Is it really worth making this
> sacrifice for? Isn't there another way to achieve it?
>
> ADK
>
> Danny Angus wrote:
>
> >No,
> >Although this whole area is the subject of change at the moment.
> >
> >d.
> >
> >
> >
> >>-----Original Message-----
> >>From: Mark Imel [mailto:james@imelshire.com]
> >>Sent: 14 February 2003 00:29
> >>To: James Developers List
> >>Subject: Re: Obtaining a reference to a mailet
> >>
> >>
> >>You're correct my question is weird. I should have double checked.
> >>I meant to say: Is there a way that my *matcher* can obtain a reference
to
> >>its coupled mailet?
> >>
> >>Sorry about the typo...
> >>
> >>
> >>----- Original Message -----
> >>From: "Kenny Smith" <ja...@journalscape.com>
> >>To: "James Developers List" <ja...@jakarta.apache.org>
> >>Sent: Thursday, February 13, 2003 1:51 PM
> >>Subject: Re: Obtaining a reference to a mailet
> >>
> >>
> >>
> >>
> >>>Hi Mark,
> >>>
> >>>The question seems weird... basic Java (all objects, not just mailets)
> >>>gives you a 'this' reference which is a reference to your object from
> >>>within... maybe you're asking a different question?
> >>>
> >>>Kenny Smith
> >>>
> >>>
> >>>Mark Imel wrote:
> >>>
> >>>
> >>>
> >>>>When my custom mailet/matcher pair are instantiated and initialized,
> >>>>is there a way for my mailet to obtain a reference to the mailet?
> >>>>
> >>>>And, if not at initialization time, can i obtain a reference at run
> >>>>
> >>>>
> >>time?
> >>
> >>
> >>>>Thanks,
> >>>>--Mark Imel
> >>>>
> >>>>
> >>>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >>
> >>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
Re: Obtaining a reference to a mailet
Posted by Aaron Knauf <ak...@xtra.co.nz>.
This thread worries me. Mailets and Matchers are completely decoupled,
at the moment. Giving a Matcher a reference to its Mailet (or vice
versa) will lead to the coupling of the two. We will end up with
Mailets that only work with a particuler Matcher.
What is the benefit that you are after? Is it really worth making this
sacrifice for? Isn't there another way to achieve it?
ADK
Danny Angus wrote:
>No,
>Although this whole area is the subject of change at the moment.
>
>d.
>
>
>
>>-----Original Message-----
>>From: Mark Imel [mailto:james@imelshire.com]
>>Sent: 14 February 2003 00:29
>>To: James Developers List
>>Subject: Re: Obtaining a reference to a mailet
>>
>>
>>You're correct my question is weird. I should have double checked.
>>I meant to say: Is there a way that my *matcher* can obtain a reference to
>>its coupled mailet?
>>
>>Sorry about the typo...
>>
>>
>>----- Original Message -----
>>From: "Kenny Smith" <ja...@journalscape.com>
>>To: "James Developers List" <ja...@jakarta.apache.org>
>>Sent: Thursday, February 13, 2003 1:51 PM
>>Subject: Re: Obtaining a reference to a mailet
>>
>>
>>
>>
>>>Hi Mark,
>>>
>>>The question seems weird... basic Java (all objects, not just mailets)
>>>gives you a 'this' reference which is a reference to your object from
>>>within... maybe you're asking a different question?
>>>
>>>Kenny Smith
>>>
>>>
>>>Mark Imel wrote:
>>>
>>>
>>>
>>>>When my custom mailet/matcher pair are instantiated and initialized,
>>>>is there a way for my mailet to obtain a reference to the mailet?
>>>>
>>>>And, if not at initialization time, can i obtain a reference at run
>>>>
>>>>
>>time?
>>
>>
>>>>Thanks,
>>>>--Mark Imel
>>>>
>>>>
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: james-dev-help@jakarta.apache.org
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: james-dev-help@jakarta.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
RE: Obtaining a reference to a mailet
Posted by Danny Angus <da...@apache.org>.
No,
Although this whole area is the subject of change at the moment.
d.
> -----Original Message-----
> From: Mark Imel [mailto:james@imelshire.com]
> Sent: 14 February 2003 00:29
> To: James Developers List
> Subject: Re: Obtaining a reference to a mailet
>
>
> You're correct my question is weird. I should have double checked.
> I meant to say: Is there a way that my *matcher* can obtain a reference to
> its coupled mailet?
>
> Sorry about the typo...
>
>
> ----- Original Message -----
> From: "Kenny Smith" <ja...@journalscape.com>
> To: "James Developers List" <ja...@jakarta.apache.org>
> Sent: Thursday, February 13, 2003 1:51 PM
> Subject: Re: Obtaining a reference to a mailet
>
>
> > Hi Mark,
> >
> > The question seems weird... basic Java (all objects, not just mailets)
> > gives you a 'this' reference which is a reference to your object from
> > within... maybe you're asking a different question?
> >
> > Kenny Smith
> >
> >
> > Mark Imel wrote:
> >
> > > When my custom mailet/matcher pair are instantiated and initialized,
> > > is there a way for my mailet to obtain a reference to the mailet?
> > >
> > > And, if not at initialization time, can i obtain a reference at run
> time?
> > >
> > > Thanks,
> > > --Mark Imel
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
Re: Obtaining a reference to a mailet
Posted by Mark Imel <ja...@imelshire.com>.
You're correct my question is weird. I should have double checked.
I meant to say: Is there a way that my *matcher* can obtain a reference to
its coupled mailet?
Sorry about the typo...
----- Original Message -----
From: "Kenny Smith" <ja...@journalscape.com>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Thursday, February 13, 2003 1:51 PM
Subject: Re: Obtaining a reference to a mailet
> Hi Mark,
>
> The question seems weird... basic Java (all objects, not just mailets)
> gives you a 'this' reference which is a reference to your object from
> within... maybe you're asking a different question?
>
> Kenny Smith
>
>
> Mark Imel wrote:
>
> > When my custom mailet/matcher pair are instantiated and initialized,
> > is there a way for my mailet to obtain a reference to the mailet?
> >
> > And, if not at initialization time, can i obtain a reference at run
time?
> >
> > Thanks,
> > --Mark Imel
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
Re: Obtaining a reference to a mailet
Posted by Kenny Smith <ja...@journalscape.com>.
Hi Mark,
The question seems weird... basic Java (all objects, not just mailets)
gives you a 'this' reference which is a reference to your object from
within... maybe you're asking a different question?
Kenny Smith
Mark Imel wrote:
> When my custom mailet/matcher pair are instantiated and initialized,
> is there a way for my mailet to obtain a reference to the mailet?
>
> And, if not at initialization time, can i obtain a reference at run time?
>
> Thanks,
> --Mark Imel
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
RE: Obtaining a reference to a mailet
Posted by "Noel J. Bergman" <no...@devtech.com>.
For what purpose? You could use the MailetContext to register the presence
of the object.
--- Noel
-----Original Message-----
From: Mark Imel [mailto:mimel@imelshire.com]
Sent: Thursday, February 13, 2003 16:13
To: james-dev@jakarta.apache.org
Subject: Obtaining a reference to a mailet
When my custom mailet/matcher pair are instantiated and initialized, is
there a way for my mailet to obtain a reference to the mailet?
And, if not at initialization time, can i obtain a reference at run time?
Thanks,
--Mark Imel
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org