edu.vt.middleware.ldap.pool
Class DefaultLdapFactory

java.lang.Object
  extended by edu.vt.middleware.ldap.pool.AbstractLdapFactory<Ldap>
      extended by edu.vt.middleware.ldap.pool.DefaultLdapFactory
All Implemented Interfaces:
LdapFactory<Ldap>

public class DefaultLdapFactory
extends AbstractLdapFactory<Ldap>

DefaultLdapFactory provides a simple implementation of an ldap factory.

Version:
$Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class edu.vt.middleware.ldap.pool.AbstractLdapFactory
activator, logger, passivator, validator
 
Constructor Summary
DefaultLdapFactory()
          This creates a new DefaultLdapFactory with the default properties file, which must be located in your classpath.
DefaultLdapFactory(InputStream is)
          This creates a new DefaultLdapFactory with the supplied input stream.
DefaultLdapFactory(LdapConfig lc)
          This creates a new DefaultLdapFactory with the supplied ldap configuration.
 
Method Summary
 Ldap create()
          Create a new ldap object.
 void destroy(Ldap l)
          Destroy an ldap object.
 boolean getConnectOnCreate()
          Returns whether ldap objects will attempt to connect after creation.
 void setConnectOnCreate(boolean b)
          This sets whether newly created ldap objects will attempt to connect.
 
Methods inherited from class edu.vt.middleware.ldap.pool.AbstractLdapFactory
activate, getLdapActivator, getLdapPassivator, getLdapValidator, passivate, setLdapActivator, setLdapPassivator, setLdapValidator, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLdapFactory

public DefaultLdapFactory()
This creates a new DefaultLdapFactory with the default properties file, which must be located in your classpath.


DefaultLdapFactory

public DefaultLdapFactory(InputStream is)
This creates a new DefaultLdapFactory with the supplied input stream.

Parameters:
is - InputStream

DefaultLdapFactory

public DefaultLdapFactory(LdapConfig lc)
This creates a new DefaultLdapFactory with the supplied ldap configuration. The ldap configuration will be marked as immutable by this factory.

Parameters:
lc - ldap config
Method Detail

getConnectOnCreate

public boolean getConnectOnCreate()
Returns whether ldap objects will attempt to connect after creation. Default is true.

Returns:
boolean

setConnectOnCreate

public void setConnectOnCreate(boolean b)
This sets whether newly created ldap objects will attempt to connect. Default is true.

Parameters:
b - connect on create

create

public Ldap create()
Create a new ldap object.

Specified by:
create in interface LdapFactory<Ldap>
Specified by:
create in class AbstractLdapFactory<Ldap>
Returns:
ldap object

destroy

public void destroy(Ldap l)
Destroy an ldap object.

Specified by:
destroy in interface LdapFactory<Ldap>
Specified by:
destroy in class AbstractLdapFactory<Ldap>
Parameters:
l - ldap object


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.