[Date Prev][Date Next] [Chronological] [Thread] [Top]

Java-api-12 - input/output stream



 
I have been trying to figure out how the set/get inputStream & OutputStream
methods should be used in the LDAPConnection class.  The
document 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 and
not also set the outputstream. If this is true, then the method should
set 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 be
subclassed to add encryption or other functionality?
Or does it only make sense to change the streams only
after the connect and before the bind or the first operation?
 
3) I don't ever see an application using the existing input/output
streams directly on a connection in progresss - i.e., trying to read
on the input stream - that could cause great confusion in the API
as the reader thread in the api and the application contend for
input data.  Rather they would only be used to create sub classes
that extend their functionality.  Am I on the right track here?
 
-Steve
 
------------------------
Steve Sonntag
Novell, Inc., the leading provider of Net services software