|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.LDAPServerConnector
public class LDAPServerConnector
LDAPServerConnector is an LDAP server that returns a client connection from the getNextClient method. The returned connector interface is initialized with an LDAP client connection. Calls to the returned connector should be getNextEntry() to retrieve the next client request (e.g. bind, search etc), putEntry() to send search results to the LDAP client and finally replyEntry() to send the status message that completes the client request.
The returned connector is not thread safe. Alls calls to putEntry and replyEntry uses the previous getNextEntry request attributes in the data sent to the client. Specifically, the LDAP message id and response operation code is reused from the client request.
Field Summary | |
---|---|
static String |
PARAM_SYSTEM_TCP_BACKLOG
|
static String |
PARAM_TCP_BACKLOG
|
Fields inherited from class com.ibm.di.connector.Connector |
---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
Constructor Summary | |
---|---|
LDAPServerConnector()
Default constructor. |
Method Summary | |
---|---|
LDAPControl |
createControl(String oid)
|
ConnectorInterface |
getNextClient()
Server mode - returns a new instance of the connector with a client connection. |
Entry |
getNextEntry()
Returns the next Entry from the LDAP client. |
static ResourceHash |
getResHash()
|
LDAPServerConnector |
getServerConnector()
Returns the server connector if this connector is handling an LDAP client session. |
String |
getVersion()
Return version information |
void |
initialize(Object obj)
Initialize the connector. |
boolean |
isAbandoned(int messageID)
This method returns true if there is an abandon message in the queue with the specified message ID. |
boolean |
isAccepting()
Returns true if this connector is currently waiting for a client connection. |
boolean |
isTerminating()
Returns true if this connector has the termination flag set. |
void |
putEntry(Entry entry)
Sends a search result entry to the LDAP client in response to a search request. |
void |
replyEntry(Entry conn)
Send an LDAP result message in response to the last request from the LDAP Client. |
void |
setServerConnector(LDAPServerConnector serverConnector)
Sets the server connector for this connector. |
void |
terminate()
Terminate the connector. |
void |
terminateServer()
This method tries to terminate the server by setting the termination flag for the connector returned by getServerConnector and immediatly connecting to its port (which should fail). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
---|
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, selectEntries, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface |
Field Detail |
---|
public static final String PARAM_TCP_BACKLOG
public static final String PARAM_SYSTEM_TCP_BACKLOG
Constructor Detail |
---|
public LDAPServerConnector()
Method Detail |
---|
public static ResourceHash getResHash()
public LDAPServerConnector getServerConnector()
public void setServerConnector(LDAPServerConnector serverConnector)
public boolean isAccepting()
public boolean isTerminating()
public void terminateServer() throws Exception
terminateServer
in interface ConnectorInterface
terminateServer
in class Connector
Exception
public void initialize(Object obj) throws Exception
initialize
in interface ConnectorInterface
initialize
in class Connector
obj
- Null, Socket or ConnectorMode class
Exception
public void terminate() throws Exception
terminate
in interface ConnectorInterface
terminate
in class Connector
Exception
public ConnectorInterface getNextClient() throws Exception
getNextClient
in interface ConnectorInterface
getNextClient
in class Connector
Exception
public Entry getNextEntry() throws Exception
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
Exception
Connector.selectEntries()
public void putEntry(Entry entry) throws Exception
putEntry
in interface ConnectorInterface
putEntry
in class Connector
entry
- The entry. It must contain the $dn attribute plus other LDAP attributes.
Exception
- Any exceptions thrown by the connector's underlying classespublic void replyEntry(Entry conn) throws Exception
replyEntry
in interface ConnectorInterface
replyEntry
in class Connector
Exception
public boolean isAbandoned(int messageID) throws Exception
messageID
- The LDAP Message ID
Exception
public LDAPControl createControl(String oid)
public String getVersion()
getVersion
in interface VersionInfoInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |