com.metamatrix.connector.ldap
Class LDAPConnection
java.lang.Object
org.teiid.connector.basic.BasicConnection
com.metamatrix.connector.ldap.LDAPConnection
- All Implemented Interfaces:
- Connection
public class LDAPConnection
- extends BasicConnection
Represents a connection to an LDAP data source.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LDAP_AUTH_TYPE
public static final java.lang.String LDAP_AUTH_TYPE
- See Also:
- Constant Field Values
LDAP_USER_OBJECT_TYPE
public static final java.lang.String LDAP_USER_OBJECT_TYPE
- See Also:
- Constant Field Values
LDAP_REFERRAL_MODE
public static final java.lang.String LDAP_REFERRAL_MODE
- See Also:
- Constant Field Values
LDAPConnection
public LDAPConnection(ExecutionContext ctx,
java.util.Properties props,
ConnectorLogger logger)
throws ConnectorException
- Constructor.
- Parameters:
ctx
- props
- logger
-
- Throws:
ConnectorException
createResultSetExecution
public ResultSetExecution createResultSetExecution(IQueryCommand command,
ExecutionContext executionContext,
RuntimeMetadata metadata)
throws ConnectorException
- Overrides:
createResultSetExecution
in class BasicConnection
- Throws:
ConnectorException
createUpdateExecution
public UpdateExecution createUpdateExecution(ICommand command,
ExecutionContext executionContext,
RuntimeMetadata metadata)
throws ConnectorException
- Overrides:
createUpdateExecution
in class BasicConnection
- Throws:
ConnectorException
close
public void close()
- Closes LDAP context, effectively closing the connection to LDAP.
(non-Javadoc)
- See Also:
com.metamatrix.connector.pool.PoolAwareConnection#closeSource()
isAlive
public boolean isAlive()
- Currently, this method always returns alive. We assume the connection is alive,
and rely on proper timeout values to automatically clean up connections before
any server-side timeout occurs. Rather than incur overhead by rebinding,
we'll assume the connection is always alive, and throw an error when it is actually used,
if the connection fails. This may be a more efficient way of handling failed connections,
with the one tradeoff that stale connections will not be detected until execution time. In
practice, there is no benefit to detecting stale connections before execution time.
One possible extension is to implement a UnsolicitedNotificationListener.
(non-Javadoc)
- Specified by:
isAlive
in interface Connection
- Overrides:
isAlive
in class BasicConnection
- Returns:
- true if open, false if there is a source error.
- See Also:
com.metamatrix.connector.pool.PoolAwareConnection#isAlive()
closeCalled
public void closeCalled()
- Description copied from interface:
Connection
- Called by the pool to indicate that the connection was returned to the pool.
The actual close call will be made when the pool wants to purge this connection.
- Specified by:
closeCalled
in interface Connection
- Overrides:
closeCalled
in class BasicConnection
Copyright © 2009. All Rights Reserved.