|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.idm.connection.ConnectionManager
oracle.idm.connection.ldap.LdapConnectionManager
public class LdapConnectionManager
This class implements the LDAP connection manager. LDAP connection managers use the LDAP context delegates to perform LDAP context operations, and simply maintain the mapping between the LDAP connection and an LDAP context. This allows for more flexibility in how LDAP contexts are created while it reduces the complexity of the LDAP context manager that may need to be implemented by the end user of the framework in order to provide application specific logic.
When modifying LDAP connection manager properties directly, synchronize with the connection pool in order to avoid undesirable side effects, as follows:
synchronized (pool) { manager.setValidating(false); }
Note: Each LdapContext that comes from the LDAP connection manager will contain the following environment property, so you can get back the LdapConnection:
// Get LdapConnection reference from LdapContext. LdapConnection connection = (LdapConnection)context.getEnvironment().get(Connection.Parameter.REFERENCE);
Field Summary |
---|
Fields inherited from class oracle.idm.connection.ConnectionManager |
---|
tag |
Fields inherited from interface oracle.idm.connection.ConnectionDelegate |
---|
DEFAULT_LIMIT, DEFAULT_PRIORITY, DEFAULT_PROXYING, DEFAULT_STACK_TRACING, DEFAULT_VALIDATING, DEFAULT_WEIGHT |
Constructor Summary | |
---|---|
LdapConnectionManager(LdapContextDelegate delegate) Constructor for the LDAP connection manager. |
Method Summary | |
---|---|
boolean |
canCloseConnection(Connection connection, java.util.Map parameters) Returns true if this connection can be closed. |
boolean |
canOpenConnection(java.util.Map parameters) Returns true if this connection can be opened. |
boolean |
canProxyConnection(Connection connection, java.util.Map parameters) Returns true if this connection can be proxied. |
boolean |
canValidateConnection(Connection connection, java.util.Map parameters) Returns true if this connection can be validated. |
java.util.Map |
cloneEnvironment(java.util.Map environment) This method clones the LDAP context environment of this connection. |
java.util.Map |
cloneParameters(java.util.Map parameters) This method colones parameters to be internalized by the connection. |
void |
closeConnection(Connection connection, java.util.Map parameters) This method logs, records, and counts close connection operation. |
LdapContextDelegate |
getLdapContextDelegate() Returns the LDAP context delegate for this connection manager. |
java.lang.String |
getType() Getter for the type of this connection delegate. |
boolean |
isAlteredConnection(Connection connection, java.util.Map parameters) Returns true if this is the connection has been altered, called from the pool upon release and return operations to check for connection integrity. |
boolean |
isMatchingConnection(Connection connection, java.util.Map parameters) Returns true if this is a matching connection without the need to be proxied. |
boolean |
isMatchingParameters(java.util.Map parameters) Tests if the connection delegate matches specified parameters. |
boolean |
isProxying() Getter for the proxying mode. |
boolean |
isValidating() Getter for the validating mode. |
Connection |
openConnection(java.util.Map parameters) This method opens a connection. |
void |
proxyConnection(Connection connection, java.util.Map parameters) This method logs, records, and counts proxy connection operation. |
void |
resetProxying() Resets the proxying mode to DEFAULT_PROXYING. |
void |
resetValidating() Resets the validating mode to DEFAULT_VALIDATING. |
void |
setProxying(boolean proxying) Setter for the proxying mode. |
void |
setValidating(boolean validating) Setter for the validating mode. |
void |
validateConnection(Connection connection, java.util.Map parameters) This method logs, records, and counts validate connection operation. |
protected void |
xprintBody(XmlPrintWriter out) This method prints the connection manager XML tag body. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LdapConnectionManager(LdapContextDelegate delegate)
Method Detail |
---|
public java.lang.String getType()
ConnectionDelegate
A connection delegate type must match the type of the connection it manages.
public boolean isProxying()
ConnectionDelegate
isProxying
in interface ConnectionDelegate
isProxying
in class ConnectionManager
public void setProxying(boolean proxying) throws java.lang.UnsupportedOperationException
ConnectionDelegate
If this operation is not suported, throw UnsupportedOperationException
setProxying
in interface ConnectionDelegate
setProxying
in class ConnectionManager
java.lang.UnsupportedOperationException
public void resetProxying() throws java.lang.UnsupportedOperationException
ConnectionDelegate
If this operation is not suported, throw UnsupportedOperationException
resetProxying
in interface ConnectionDelegate
resetProxying
in class ConnectionManager
java.lang.UnsupportedOperationException
public boolean isValidating()
ConnectionDelegate
isValidating
in interface ConnectionDelegate
isValidating
in class ConnectionManager
public void setValidating(boolean validating) throws java.lang.UnsupportedOperationException
ConnectionDelegate
If this operation is not suported, throw UnsupportedOperationException
setValidating
in interface ConnectionDelegate
setValidating
in class ConnectionManager
java.lang.UnsupportedOperationException
public void resetValidating() throws java.lang.UnsupportedOperationException
ConnectionDelegate
If this operation is not suported, throw UnsupportedOperationException
resetValidating
in interface ConnectionDelegate
resetValidating
in class ConnectionManager
java.lang.UnsupportedOperationException
public LdapContextDelegate getLdapContextDelegate()
public final boolean isMatchingParameters(java.util.Map parameters)
ConnectionDelegate
This method must test for matching type and any other connection delegate specific parameters.
The connection pool will call this method on each connection delegate before selecting it to process the connection request. If this method returns false, the connection delegate will not be selected for the request. Thus this method can be used to implement connection subtypes or perform other pruning of potential targets for request fulfillment.
isMatchingParameters
in interface ConnectionDelegate
isMatchingParameters
in class ConnectionManager
public boolean canOpenConnection(java.util.Map parameters) throws ConnectionException
ConnectionDelegate
The connection pool will call this method on each connection delegate before performin the open operation. If this method returns false, the connection delegate will not be selected for the open operation.
This method is very similar ot the isMatchingParameters(Map) method, except that is is called only for open operations and can do more operation specific pruning of potential targets for that operaion.
Typically, implementations of this method will call the isMatchingParameters(Map) method and do further operation specific checks.
Does not check for reached limit, this should be left to the pool.
Does not enforce operation timeouts, this should be left to the pool.
canOpenConnection
in interface ConnectionDelegate
canOpenConnection
in class ConnectionManager
ConnectionException
public Connection openConnection(java.util.Map parameters) throws ConnectionException
ConnectionDelegate
ConnectionException
public boolean canCloseConnection(Connection connection, java.util.Map parameters) throws ConnectionException
ConnectionDelegate
The connection pool will call this method on each connection delegate before performin the close operation. If this method returns false, the connection delegate will not be selected for the close operation.
This method is very similar ot the isMatchingParameters(Map) method, except that is is called only for close operations and can do more operation specific pruning of potential targets for that operaion.
Typically, implementations of this method will call the isMatchingParameters(Map) method and do further operation specific checks.
Does not enforce operation timeouts, this should be left to the pool.
canCloseConnection
in interface ConnectionDelegate
canCloseConnection
in class ConnectionManager
ConnectionException
public void closeConnection(Connection connection, java.util.Map parameters) throws ConnectionException
ConnectionManager
This method is called from the ConnectionPool.
closeConnection
in interface ConnectionDelegate
closeConnection
in class ConnectionManager
ConnectionException
public boolean canProxyConnection(Connection connection, java.util.Map parameters) throws ConnectionException
ConnectionDelegate
The connection pool will call this method on each connection delegate before performin the proxy operation. If this method returns false, the connection delegate will not be selected for the proxy operation.
This method is very similar ot the isMatchingParameters(Map) method, except that is is called only for proxy operations and can do more operation specific pruning of potential targets for that operaion.
Typically, implementations of this method will call the isMatchingParameters(Map) method and do further operation specific checks.
Does not enforce operation timeouts, this should be left to the pool.
canProxyConnection
in interface ConnectionDelegate
canProxyConnection
in class ConnectionManager
ConnectionException
public void proxyConnection(Connection connection, java.util.Map parameters) throws ConnectionException, java.lang.UnsupportedOperationException
ConnectionManager
This method is called from the ConnectionPool.
proxyConnection
in interface ConnectionDelegate
proxyConnection
in class ConnectionManager
ConnectionException
java.lang.UnsupportedOperationException
public boolean isMatchingConnection(Connection connection, java.util.Map parameters) throws ConnectionException
ConnectionDelegate
isMatchingConnection
in interface ConnectionDelegate
isMatchingConnection
in class ConnectionManager
ConnectionException
public boolean isAlteredConnection(Connection connection, java.util.Map parameters) throws ConnectionException
ConnectionDelegate
isAlteredConnection
in interface ConnectionDelegate
isAlteredConnection
in class ConnectionManager
ConnectionException
public boolean canValidateConnection(Connection connection, java.util.Map parameters) throws ConnectionException
ConnectionDelegate
The connection pool will call this method on each connection delegate before performin the validate operation. If this method returns false, the connection delegate will not be selected for the validate operation.
This method is very similar ot the isMatchingParameters(Map) method, except that is is called only for validate operations and can do more operation specific pruning of potential targets for that operaion.
Typically, implementations of this method will call the isMatchingParameters(Map) method and do further operation specific checks.
Does not enforce operation timeouts, this should be left to the pool.
Does not check for altered connections, this should be left to the pool.
canValidateConnection
in interface ConnectionDelegate
canValidateConnection
in class ConnectionManager
ConnectionException
public void validateConnection(Connection connection, java.util.Map parameters) throws ConnectionException, java.lang.UnsupportedOperationException
ConnectionManager
This method is called from the ConnectionPool.
validateConnection
in interface ConnectionDelegate
validateConnection
in class ConnectionManager
ConnectionException
java.lang.UnsupportedOperationException
public java.util.Map cloneParameters(java.util.Map parameters)
ConnectionDelegate
This method returns a clone of original parameteres.
This method must hide all sensitive parameters, such as passwords.
public java.util.Map cloneEnvironment(java.util.Map environment)
It will hide all sensitive parameters.
protected void xprintBody(XmlPrintWriter out)
ConnectionManager
xprintBody
in class ConnectionManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |