|
|||||||||||
| 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
Configuration parameter name: "com.ibm.di.tcp.backlog" |
static String |
PARAM_TCP_BACKLOG
Configuration parameter name: "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)
Creates an instance of the LDAPControl class. |
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()
Retrieves server connector. |
String |
getVersion()
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()
Checks if the connector is waiting for a client connection. |
boolean |
isTerminating()
Checks if a termination request is sent. |
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 immediately 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)
serverConnector - the server connector to set.public boolean isAccepting()
public boolean isTerminating()
public void terminateServer()
throws Exception
terminateServer in interface ConnectorInterfaceterminateServer in class ConnectorException - if an error occurs.
public void initialize(Object obj)
throws Exception
initialize in interface ConnectorInterfaceinitialize in class Connectorobj - Null, Socket or ConnectorMode class
Exception - if an error occurs.
public void terminate()
throws Exception
terminate in interface ConnectorInterfaceterminate in class ConnectorException - if an error occurs.
public ConnectorInterface getNextClient()
throws Exception
getNextEntry() to get requests
from the client, putEntry(Entry) to send a search result to the
client, and finally replyEntry(Entry) to send the LDAP result
message.
getNextClient in interface ConnectorInterfacegetNextClient in class ConnectorException - if an error occurs.
public Entry getNextEntry()
throws Exception
getNextEntry in interface ConnectorInterfacegetNextEntry in class ConnectorException - if an error occurs.Connector.selectEntries()
public void putEntry(Entry entry)
throws Exception
putEntry in interface ConnectorInterfaceputEntry in class Connectorentry - The entry. It must contain the $dn attribute plus other LDAP
attributes.
Exception - if an error occurs.
public void replyEntry(Entry conn)
throws Exception
replyEntry in interface ConnectorInterfacereplyEntry in class Connectorconn - the entry, result of the Output Mapping
Exception - if an error occurs.
public boolean isAbandoned(int messageID)
throws Exception
messageID - The LDAP Message ID
Exception - if an error occurs.public LDAPControl createControl(String oid)
LDAPControl class.
oid - the extended operation id
public String getVersion()
getVersion in interface VersionInfoInterface
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||