Re: non-http server

Costin Manolache writes:
 > On Thu, 17 Apr 1997, Anselm Baird_Smith wrote:
 > > Check the w3c.jigsaw.daemon package, it's purpose is exactly to be
 > > able to run a non-http server within a java vm. You will probably want
 > > to reuse some of the mime class, though (I guess POP is an rfc822-like
 > > porotocol, haven't read the spec though)
 > I want to reuse the Socket-handling part, with all the associated
 > properties. 
 > The ServerHandler interface seems ok, but w3c.jigsaw.http.httpd impl. is
 > too big and I see no way to subclass ( I need fewer capabilities, not
 > more).

There is a clear lack of something between ServerHandler and httpd,
the problem is that to define the correct API for that "middle-class"
one would probably have to implement a non-http handlder (I have
written only two of them, and they are pretty close to httpd)

 > A "flow" may be usefull - it seems that factory.handleConnection() makes
 > the protocol-work. Also the "clientFactory" can be changed via properties.
 > SocketClientFactory launch a LRU-able object, but where can I fit my own
 > protocol-handler?

httpd has a thread that runs the "accept loop" Once accept brings up a
new socket, it is handed out to an instance of the
"w3c.jigsaw.http.ClientFactory" designated class (defaults to
socket.SocketClientFactory). That factory has to implement
handleConnection, to handle the new connection (in httpd/socket this
results in the creaton of a SocketClient instance)

Hope this helps,
Anselm.

Received on Thursday, 17 April 1997 16:00:21 UTC