Package org.teiid.translator.ldap
Class LDAPSyncQueryExecution
- java.lang.Object
-
- org.teiid.translator.ldap.LDAPSyncQueryExecution
-
- All Implemented Interfaces:
Execution
,ResultSetExecution
- Direct Known Subclasses:
LDAPDirectSearchQueryExecution
public class LDAPSyncQueryExecution extends Object implements ResultSetExecution
LDAPSyncQueryExecution is responsible for executing an LDAP search corresponding to a read-only "select" query from Teiid.
-
-
Field Summary
Fields Modifier and Type Field Description protected LDAPQueryExecution
delegate
protected ExecutionContext
executionContext
protected LDAPExecutionFactory
executionFactory
protected LdapContext
ldapConnection
-
Constructor Summary
Constructors Constructor Description LDAPSyncQueryExecution(Select query, LDAPExecutionFactory factory, ExecutionContext context, LdapContext connection)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancels the execution abnormally.void
close()
Terminates the execution normally.protected LdapContext
createSearchContext(String contextName)
Perform a lookup against the initial LDAP context, which sets the context to something appropriate for the search that is about to occur.void
execute()
method to execute the supplied queryList<?>
next()
Retrieves the next row of the resultset.
-
-
-
Field Detail
-
ldapConnection
protected LdapContext ldapConnection
-
executionFactory
protected LDAPExecutionFactory executionFactory
-
executionContext
protected ExecutionContext executionContext
-
delegate
protected LDAPQueryExecution delegate
-
-
Constructor Detail
-
LDAPSyncQueryExecution
public LDAPSyncQueryExecution(Select query, LDAPExecutionFactory factory, ExecutionContext context, LdapContext connection)
Constructor- Parameters:
connection
- the LDAP Context
-
-
Method Detail
-
execute
public void execute() throws TranslatorException
method to execute the supplied query- Specified by:
execute
in interfaceExecution
- Throws:
TranslatorException
-
createSearchContext
protected LdapContext createSearchContext(String contextName) throws TranslatorException
Perform a lookup against the initial LDAP context, which sets the context to something appropriate for the search that is about to occur.- Throws:
TranslatorException
-
next
public List<?> next() throws TranslatorException, DataNotAvailableException
Description copied from interface:ResultSetExecution
Retrieves the next row of the resultset.- Specified by:
next
in interfaceResultSetExecution
- Returns:
- the next row or null indicating that there are no more results
- Throws:
TranslatorException
DataNotAvailableException
-
cancel
public void cancel() throws TranslatorException
Description copied from interface:Execution
Cancels the execution abnormally. This will happen via a different thread from the one performing the execution, so should be expected to happen in a multi-threaded scenario.- Specified by:
cancel
in interfaceExecution
- Throws:
TranslatorException
-
-