org.apache.ldap.server.jndi
Class JndiProvider

java.lang.Object
  extended byorg.apache.ldap.server.jndi.JndiProvider
All Implemented Interfaces:
BackendSubsystem

public class JndiProvider
extends java.lang.Object
implements BackendSubsystem

The BackendSubsystem service implementation.

Version:
$Rev: 159259 $
Author:
Apache Directory Project

Constructor Summary
JndiProvider(RootNexus nexus)
          Creates a singlton instance of the BackendSubsystem.
 
Method Summary
 javax.naming.Context getDeadContext()
          A dead context is requested and returned when we shutdown the system.
 Interceptor getInterceptor()
           
 javax.naming.ldap.LdapContext getLdapContext(java.util.Hashtable env)
          Gets an LdapContext to attach to a point in the DIT using the supplied environment parameters.
 java.lang.Object invoke(Invocation call)
           
 void setInterceptor(Interceptor interceptor)
           
 void shutdown()
           
 void sync()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiProvider

public JndiProvider(RootNexus nexus)
Creates a singlton instance of the BackendSubsystem. In the words of the Highlander, "there can only be one."

Throws:
java.lang.IllegalStateException - if another JndiProvider has already been instantiated.
Method Detail

getLdapContext

public javax.naming.ldap.LdapContext getLdapContext(java.util.Hashtable env)
                                             throws javax.naming.NamingException
Description copied from interface: BackendSubsystem
Gets an LdapContext to attach to a point in the DIT using the supplied environment parameters.

Specified by:
getLdapContext in interface BackendSubsystem
Parameters:
env - environment settings to use for the context
Returns:
an LdapContext using the supplied environment
Throws:
javax.naming.NamingException - if something goes wrong
See Also:
BackendSubsystem.getLdapContext(Hashtable)

sync

public void sync()
          throws javax.naming.NamingException
Specified by:
sync in interface BackendSubsystem
Throws:
javax.naming.NamingException

shutdown

public void shutdown()
              throws javax.naming.NamingException
Specified by:
shutdown in interface BackendSubsystem
Throws:
javax.naming.NamingException

getInterceptor

public Interceptor getInterceptor()

setInterceptor

public void setInterceptor(Interceptor interceptor)

invoke

public java.lang.Object invoke(Invocation call)
                        throws javax.naming.NamingException
Throws:
javax.naming.NamingException

getDeadContext

public javax.naming.Context getDeadContext()
A dead context is requested and returned when we shutdown the system. It prevents a NoInitialContextException from being thrown by InitialContext or one of its subclasses.

Returns:
a unusable dead context


Copyright © 2002-2005 . All Rights Reserved.