org.openmdx.resource.ldap.v3
Class AbstractConnectionFactory

java.lang.Object
  extended by org.openmdx.resource.ldap.v3.AbstractConnectionFactory
All Implemented Interfaces:
Serializable, ManagedConnectionFactory
Direct Known Subclasses:
LDAPConnectionFactory, URLConnectionFactory

public abstract class AbstractConnectionFactory
extends Object
implements ManagedConnectionFactory

Managed LDAP Connection Factory

See Also:
Serialized Form

Field Summary
protected static int DEFAULT_PROTOCOL_VERSION
          Default LDAP protocol version
 
Constructor Summary
AbstractConnectionFactory()
           
 
Method Summary
 Object createConnectionFactory()
           
 Object createConnectionFactory(ConnectionManager connectionManager)
           
 boolean equals(Object that)
          Overriding equals() is required.
 String getConnectionURL()
          Retrieve connectionURL.
protected  PasswordCredential getCredential(Subject subject)
           
 PrintWriter getLogWriter()
           
protected  String getPassword()
          Retrieve password.
 Integer getProtocolVersion()
           
 String getUserName()
          Retrieve userName.
 int hashCode()
          Overriding hashCode() is required.
protected  ResourceException log(ResourceException exception)
          Log and return an exception
 ManagedConnection matchManagedConnections(Set managedConnections, Subject subject, ConnectionRequestInfo connectionRequestInfo)
           
 void setConnectionURL(String connectionURL)
          Set connectionURL.
 void setLogWriter(PrintWriter logWriter)
           
 void setPassword(String password)
          Set password.
 void setProtocolVersion(Integer protocolVersion)
           
 void setUserName(String userName)
          Set userName.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.resource.spi.ManagedConnectionFactory
createManagedConnection
 

Field Detail

DEFAULT_PROTOCOL_VERSION

protected static int DEFAULT_PROTOCOL_VERSION
Default LDAP protocol version

Constructor Detail

AbstractConnectionFactory

public AbstractConnectionFactory()
Method Detail

createConnectionFactory

public final Object createConnectionFactory()
                                     throws ResourceException
Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Throws:
ResourceException

createConnectionFactory

public final Object createConnectionFactory(ConnectionManager connectionManager)
                                     throws ResourceException
Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Throws:
ResourceException

getLogWriter

public final PrintWriter getLogWriter()
                               throws ResourceException
Specified by:
getLogWriter in interface ManagedConnectionFactory
Throws:
ResourceException

matchManagedConnections

public final ManagedConnection matchManagedConnections(Set managedConnections,
                                                       Subject subject,
                                                       ConnectionRequestInfo connectionRequestInfo)
                                                throws ResourceException
Specified by:
matchManagedConnections in interface ManagedConnectionFactory
Throws:
ResourceException

getCredential

protected PasswordCredential getCredential(Subject subject)
                                    throws ResourceException
Parameters:
subject -
Returns:
Throws:
ResourceException

setLogWriter

public final void setLogWriter(PrintWriter logWriter)
                        throws ResourceException
Specified by:
setLogWriter in interface ManagedConnectionFactory
Throws:
ResourceException

getConnectionURL

public final String getConnectionURL()
Retrieve connectionURL.

Returns:
Returns the connectionURL.

setConnectionURL

public final void setConnectionURL(String connectionURL)
Set connectionURL.

Parameters:
connectionURL - The connectionURL to set.

getProtocolVersion

public Integer getProtocolVersion()

setProtocolVersion

public void setProtocolVersion(Integer protocolVersion)

log

protected final ResourceException log(ResourceException exception)
Log and return an exception

Parameters:
an - exception
Returns:
the exception

setPassword

public final void setPassword(String password)
Set password.

Parameters:
password - The password to set.

getPassword

protected final String getPassword()
Retrieve password.

Returns:
Returns the password.

getUserName

public final String getUserName()
Retrieve userName.

Returns:
Returns the userName.

setUserName

public final void setUserName(String userName)
Set userName.

Parameters:
userName - The userName to set.

equals

public boolean equals(Object that)
Overriding equals() is required.

Specified by:
equals in interface ManagedConnectionFactory
Overrides:
equals in class Object

hashCode

public int hashCode()
Overriding hashCode() is required.

Specified by:
hashCode in interface ManagedConnectionFactory
Overrides:
hashCode in class Object


This software is published under the BSD license. Copyright © 2003-2008, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.