tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Cittadini" <>
Subject RE: Access to the Socket
Date Thu, 06 Apr 2000 07:46:17 GMT
In answer to question (a), it does alreadyÂ…..  (I should look harder next

-----Original Message-----
From: David Cittadini []
Sent: Thursday, 6 April 2000 17:17
Subject: RE: Access to the Socket

I have created my own security implementation that, amongst other things, is
centred on creating an HttpServer and then registering my own Security
Provider and Security Interceptor.  As part of the authentication process,
the interceptor calls isSecure() on the Request that in turn calls
isSecure() on the Security Provider.  The Security Provider then checks the
Request type (via getRealRequest()) and if it was a ServerRequest I called
getSocket() on it.  This then enabled me perform some specialist processing
in situations where I had my own specialised Socket.

However, in version 3.1 you can no longer get the Socket from the request
(via ServerRequest).  As a result, I am probably going to have to write my
own Connector and enable it to publish the Socket.  Then, inside my Security
Provider, I will have to call the Context Manager, run through the
registered connectors and match the calling port of the Request with the
ports of the connectors in the Context Manager.  Then, once I find a
matching port, check the Connector and get the Socket and perform my
Socket-related processing.  This is certainly a bit more tortured than
version 3.0.  Therefore, questions are:

a)                   HttpRequestAdapter has a setSocket() method, why not
also provide a getSocket() method.
b)                   Is the new version trying to hide the Socket as much as
possible so that the only way I can perform Socket-related processing is to
write my own specialized Connectors?
c)                   Is using a Security Provider the preferred way to get
the provider or is a new approach being designed?

I look forward to your comments, David.

-----Original Message-----
From: Costin Manolache []
Sent: Thursday, 6 April 2000 6:27
Subject: Re: Access to the Socket

You can't get access to the socket unless you are using the standalone http
David Cittadini wrote:
In version 3.0 you could gain access to the underlying Socket of a request
by making a call through ServerRequest.However, this is deprecated in
version 3.1.Therefore, how can I get direct access to the socket of a
request?The reason for the question is that I want to implement a security
interceptor that will update the socket depending on the socket type.

View raw message