Steve Sonntag wrote:
I have been trying to figure out how
the set/get inputStream & OutputStreammethods should be used in the
LDAPConnection class. Thedocument states: Added getInputStream()getOutputStream(),
setInputStream()
(4.6.36), and setOutputStream(). They are used when establishing
a security layer with SASL, and may also be used to interpose a
proxy. A few comments. and questions: 1) I don't
ever see a case where one would set the input stream andnot also set the
outputstream. If this is true, then the method shouldset both of them,
as setting them individually is inherently not thread safe. 2) Does
it ever make sense to set these values on a connection"in progress"?
Is there an intent that the existing stream classes besubclassed to add
encryption or other functionality?Or does it only make sense to change
the streams onlyafter the connect and before the bind or the first operation? 3)
I don't ever see an application using the existing input/outputstreams
directly on a connection in progresss - i.e., trying to readon the input
stream - that could cause great confusion in the APIas the reader thread
in the api and the application contend forinput data. Rather they
would only be used to create sub classesthat extend their functionality.
Am I on the right track here? -Steve
The only use we've had for the methods so far is on SASL
bind, where the result of the operation may be a new security layer. In
that case, both input and output streams are replaced.
Someone at Novell (I don't remember who) told me sometime last
year that the methods would be useful for introducing a proxy. I thought
that was a reasonable use, so I added that comment to the draft, but I
haven't used the methods for that purpose myself.
Neither of those two uses require subclassing.
Rob
|