org.talika.tarsis.factory
Class LdapContextFactory

java.lang.Object
  extended by org.talika.tarsis.service.AbstractService
      extended by org.talika.tarsis.factory.FactoryService
          extended by org.talika.tarsis.factory.LdapContextFactory
All Implemented Interfaces:
Factory, Service

public final class LdapContextFactory
extends FactoryService

JNDI LDAP DirContext factory implementation of Factory interface.

Creates a DirContext object from given parameters.

Parameters given to create DirContext are:

Version:
$Revision: 269 $
Author:
Jose M. Palomar
See Also:
DirContext

Constructor Summary
LdapContextFactory()
          Creates a new LdapContextFactory object.
 
Method Summary
 java.lang.Object getInstance()
          Returns a new DirContext instance created by this factory.
 javax.naming.directory.DirContext getLdapContext()
          Returns a new DirContext instance created by this factory.
 java.lang.String getName()
          Returns name of service.
 void setPassword(java.lang.String password)
          Sets password parameter.
 void setUrl(java.lang.String url)
          Sets url parameter.
 void setUser(java.lang.String user)
          Sets user parameter.
 
Methods inherited from class org.talika.tarsis.service.AbstractService
destroy, getContext, getLogger, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapContextFactory

public LdapContextFactory()
Creates a new LdapContextFactory object.

Method Detail

setUrl

public void setUrl(java.lang.String url)
Sets url parameter.

Parameters:
url - String URL for LDAP connections.

setUser

public void setUser(java.lang.String user)
Sets user parameter.

Parameters:
user - String user name for LDAP connections.

setPassword

public void setPassword(java.lang.String password)
Sets password parameter.

Parameters:
password - String user password for LDAP connections.

getName

public java.lang.String getName()
Returns name of service.

Specified by:
getName in interface Service
Specified by:
getName in class AbstractService
Returns:
String name of service.
See Also:
Service.getName()

getInstance

public java.lang.Object getInstance()
Returns a new DirContext instance created by this factory.

Specified by:
getInstance in interface Factory
Specified by:
getInstance in class FactoryService
Returns:
Object a new DirContext instance created by this factory.
See Also:
Factory.getInstance()

getLdapContext

public javax.naming.directory.DirContext getLdapContext()
Returns a new DirContext instance created by this factory.

Returns:
DirContext a new DirContext instance created by this factory.


Copyright © 2002-2012 Talika Open Source Group. All Rights Reserved.