> We don't need personal address as these are straight forward user@host SMTP
> addresses, so I don't think extending javax.mail.InternetAddress is
> appropriate. However, I don't think we need a new class at all. Two final
> static methods in MailetUtils would be extremely efficient and let everyone
> continue working with Strings. Parsing a recipient into user@host is not
> the expensive part of the mail server, and I think a new class would only
> create more object overhead. I'm quite willing to be proved wrong... I've
> got OptimizeIt for performance analysis and will run JAMES under it... I bet
> after sending a thousand message through it, and MailetUtils doesn't take
> 0.2% of CPU utilization.
Take a look to the class I sent you: it's behaviour when only the getHost()
and getUser() methods are used is pretty similar to your MailUtils, but it
adds the ability to deal with MailAddress objects instead of String objects.We
are talking about APIs not about implementations so think to the awt
Point/Dimension classes: they just acts as wrappers for two integers but it's
the correct way because if you have two integers strictly related and a couple
of actions to execute over them so it's just what you need to start a class!
In JNDI we have Name for example that is a nother way to see a String
representing a name in a namespace: in JAMES we have MailAddress or whatever
we want to call it which is another way to see a String representing an email
address.
So we can clarify the APIs allowing to specify an email address both by its
string representation AND by our specifical class allowing transparent switch
between them.
Don't worry about performance because my MailAddress class will behaves
similar as MailUtil when its static methods are invoked.
About the personal field I think we shouldn't throw it away only because we
don't see it's use at the moment (adding a tail to the message with the sender
name or just using that info into the logger are a start) but we have to
retain it only because it is an information bounded into the mail so available
to everyone want's to use it. IMO personal name is another reason to switch to
MailAddress and I'll implement the class so it will not worth if you doesn't
use it at all.
Do you think we have to name that class InternetMailAddress?
Roberto
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives: <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]