geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Brooke <si...@jasmine.org.uk>
Subject Newbie stuff - implementing SMTPTransport in mail
Date Mon, 25 Aug 2003 09:07:10 GMT
On Monday 25 Aug 2003 8:21 am, Alex Blewitt wrote:
> Good call. I suggest working with the o.a.g.mail.SMTPTransport class,
> though I think it is also desirable to have an AbstractTransport
> abstract superclass that you can descend from. If there's any common
> functionality that occurs, it can go in the AbstractTransport, which
> will make it easier to write other transports later.

Sun's implementation has

java.lang.Object
  |
  +--javax.mail.Service
        |
        +--javax.mail.Transport
              |
              +--com.sun.mail.smtp.SMTPTransport

Where Service and Transport are abstract. Do I have to follow Sun's class 
structure exactly w.r.t abstract classes, or do you suggest I fold the 
functionality of Transport and Service into AbstractTransport?

In simple terms, are we seeking to implement a system in which someone can 
just run 

sed 's/javax/org.apache.geronimo' 

over their code which extends (e.g.) the JavaMail classes and have it all 
guaranteed to work?

> I think that the code should live in the \modules\javamail\src\java,
> rather than \specs\javamail\src\java, because it's an Apache
> implementation.

OK, will do.

Final question: When I throw exceptions, what are the rules for the message I 
throw? Do I just throw natural language (English) strings, or do I throw 
tokens which can be resolved for i18n at print time, and if so what is the 
format of those tokens?

Cheers

Simon

-- 
simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
	;; Our modern industrial economy takes a mountain covered with trees,
	;; lakes, running streams and transforms it into a mountain of junk,
	;; garbage, slime pits, and debris. 		      -- Edward Abbey


Mime
View raw message