|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetscape.ldap.LDAPConnThread
class LDAPConnThread
Multiple LDAPConnection clones can share a single physical connection, which is maintained by a thread. +----------------+ | LDAPConnection | --------+ +----------------+ | | +----------------+ | +----------------+ | LDAPConnection | --------+------- | LDAPConnThread | +----------------+ | +----------------+ | +----------------+ | | LDAPConnection | --------+ +----------------+ All LDAPConnections send requests and get responses from LDAPConnThread (a thread).
Field Summary | |
---|---|
(package private) static java.text.SimpleDateFormat |
m_timeFormat
|
Constructor Summary | |
---|---|
LDAPConnThread(LDAPConnSetupMgr connMgr,
LDAPCache cache,
java.lang.Object traceOutput)
Constructs a connection thread that maintains connection to the LDAP server. |
Method Summary | |
---|---|
(package private) void |
abandon(int id,
LDAPControl[] ctrls)
Stop dispatching responses for a particular message ID and send the abandon request. |
(package private) LDAPMessageQueue |
changeListener(int id,
LDAPMessageQueue toNotify)
Change listener for a message ID. |
(package private) void |
connect(LDAPConnection ldc)
|
(package private) void |
deregister(LDAPConnection conn)
De-Register with this connection thread. |
(package private) int |
getClientCount()
|
(package private) java.io.InputStream |
getInputStream()
|
(package private) java.io.OutputStream |
getOutputStream()
|
(package private) int |
getRequestCount()
|
(package private) boolean |
isBound()
|
(package private) boolean |
isConnected()
|
(package private) void |
layerSocket(LDAPTLSSocketFactory factory)
Layer a SSL socket over the current non-SSL one |
(package private) void |
logTraceMessage(java.lang.StringBuffer msg)
|
void |
register(LDAPConnection conn)
Register with this connection thread. |
(package private) void |
resultRetrieved()
This is called when a search result has been retrieved from the incoming queue. |
void |
run()
Reads from the LDAP server input stream for incoming LDAP messages. |
(package private) void |
sendRequest(LDAPConnection conn,
JDAPProtocolOp request,
LDAPMessageQueue toNotify,
LDAPConstraints cons)
Sends LDAP request via this connection thread. |
(package private) void |
setBound(boolean bound)
|
(package private) void |
setCache(LDAPCache cache)
Set the cache to use for searches. |
(package private) void |
setInputStream(java.io.InputStream is)
|
(package private) void |
setOutputStream(java.io.OutputStream os)
|
(package private) void |
setTraceOutput(java.lang.Object traceOutput)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static java.text.SimpleDateFormat m_timeFormat
Constructor Detail |
---|
public LDAPConnThread(LDAPConnSetupMgr connMgr, LDAPCache cache, java.lang.Object traceOutput)
connMgr
- the connection setup managercache
- cache object or nulltraceOutput
- trace object or nullMethod Detail |
---|
void connect(LDAPConnection ldc) throws LDAPException
LDAPException
public java.lang.String toString()
toString
in class java.lang.Object
void layerSocket(LDAPTLSSocketFactory factory) throws java.lang.Exception
java.lang.Exception
void setBound(boolean bound)
boolean isBound()
java.io.InputStream getInputStream()
void setInputStream(java.io.InputStream is)
java.io.OutputStream getOutputStream()
void setOutputStream(java.io.OutputStream os)
int getRequestCount()
void setTraceOutput(java.lang.Object traceOutput)
void logTraceMessage(java.lang.StringBuffer msg)
void setCache(LDAPCache cache)
cache
- The cache to use for searches; null
for no cachevoid sendRequest(LDAPConnection conn, JDAPProtocolOp request, LDAPMessageQueue toNotify, LDAPConstraints cons) throws LDAPException
request
- request to sendtoNotify
- response listener to invoke when the response
is ready
LDAPException
public void register(LDAPConnection conn)
conn
- LDAP connectionint getClientCount()
boolean isConnected()
void deregister(LDAPConnection conn)
conn
- LDAP connectionvoid resultRetrieved()
public void run()
run
in interface java.lang.Runnable
void abandon(int id, LDAPControl[] ctrls)
id
- Message ID for which to discard responses.LDAPMessageQueue changeListener(int id, LDAPMessageQueue toNotify)
id
- Message ID for which to chanage the listener.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |