On Tue, 21 Aug 2001 [EMAIL PROTECTED] wrote:
> That would work for most protocols I know - for example a SMTP session can
> be viewed as a number of HTTP requests in a session. Then you can use
> servlets/jsps as in a web applications. Your module will act as a proxy
> between the protocol and http.
To clarify - there are many ways to "adapt" your protocol to HTTP, and
AFAIK all existing protocols could be adapted - not 'plain' http, but http
with session.
As long as you think of your protocol as a way to encode data on the wire,
and equivalent with a number of small, discrete operations ( HELO, MAIL
FROM, etc ), you can use a lot of existing code and regular servlets to
generate the response and handle the protocol states.
This has nothing to do with using javax.servlet.Request, etc - you'll see
your protocol as a plain HTTP session, and use the regular code.
The big benefit is doing that is that you can reuse tons of tools, and it
can be as efficient as in a 'native' implementation. Since your protocol
will be an interceptor, it can do a very efficient translation.
I tried this long time ago for SMTP/POP, and it seemed to work fine. There
are already CORBA, RMI adapters ( gateways ), but they are slightly
different.
Costin