|
||||||||||
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 java.lang.String |
PARAM_SYSTEM_TCP_BACKLOG
Configuration parameter name: "com.ibm.di.tcp.backlog" |
static java.lang.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(java.lang.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. |
java.lang.String |
getVersion()
Version information. |
void |
initialize(java.lang.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. This function closes all connection and releases all resources used by the connector. This function also calls the parser's closeParser() method if a parser is active. |
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 java.lang.String PARAM_TCP_BACKLOG
public static final java.lang.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 java.lang.Exception
terminateServer
in interface ConnectorInterface
terminateServer
in class Connector
java.lang.Exception
- if an error occurs.public void initialize(java.lang.Object obj) throws java.lang.Exception
initialize
in interface ConnectorInterface
initialize
in class Connector
obj
- Null, Socket or ConnectorMode class
java.lang.Exception
- if an error occurs.public void terminate() throws java.lang.Exception
terminate
in interface ConnectorInterface
terminate
in class Connector
java.lang.Exception
- if an error occurs.public ConnectorInterface getNextClient() throws java.lang.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 ConnectorInterface
getNextClient
in class Connector
java.lang.Exception
- if an error occurs.public Entry getNextEntry() throws java.lang.Exception
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
java.lang.Exception
- if an error occurs.Connector.selectEntries()
public void putEntry(Entry entry) throws java.lang.Exception
putEntry
in interface ConnectorInterface
putEntry
in class Connector
entry
- The entry. It must contain the $dn attribute plus other LDAP
attributes.
java.lang.Exception
- if an error occurs.public void replyEntry(Entry conn) throws java.lang.Exception
replyEntry
in interface ConnectorInterface
replyEntry
in class Connector
conn
- the entry, result of the Output Mapping
java.lang.Exception
- if an error occurs.public boolean isAbandoned(int messageID) throws java.lang.Exception
messageID
- The LDAP Message ID
java.lang.Exception
- if an error occurs.public LDAPControl createControl(java.lang.String oid)
LDAPControl
class.
oid
- the extended operation id
public java.lang.String getVersion()
getVersion
in interface VersionInfoInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |