org.apache.directory.server.core
Class ReferralManagerImpl

java.lang.Object
  extended by org.apache.directory.server.core.ReferralManagerImpl
All Implemented Interfaces:
ReferralManager

public class ReferralManagerImpl
extends java.lang.Object
implements ReferralManager

Implement a referral Manager, handling the requests from the LDAP protocol.
Referrals are stored in a tree, where leaves are the referrals. We are using the very same structure than for the partition manager.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
ReferralManagerImpl(DirectoryService directoryService)
          Creates a new instance of ReferralManagerImpl.
 
Method Summary
 void addReferral(org.apache.directory.shared.ldap.entry.ServerEntry entry)
          
 org.apache.directory.shared.ldap.entry.ServerEntry getParentReferral(org.apache.directory.shared.ldap.name.DN dn)
          
 boolean hasParentReferral(org.apache.directory.shared.ldap.name.DN dn)
          
 void init(DirectoryService directoryService, java.lang.String... suffixes)
          
 boolean isReferral(org.apache.directory.shared.ldap.name.DN dn)
          
 void lockRead()
          Get a read-lock on the referralManager.
 void lockWrite()
          Get a write-lock on the referralManager.
 void remove(DirectoryService directoryService, org.apache.directory.shared.ldap.name.DN suffix)
          
 void removeReferral(org.apache.directory.shared.ldap.entry.ServerEntry entry)
          
 void unlock()
          Release the read-write lock on the referralManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferralManagerImpl

public ReferralManagerImpl(DirectoryService directoryService)
                    throws java.lang.Exception
Creates a new instance of ReferralManagerImpl.

Parameters:
directoryService - The directory service
Throws:
java.lang.Exception - If we can't initialize the manager
Method Detail

lockRead

public void lockRead()
Get a read-lock on the referralManager. No read operation can be done on the referralManager if this method is not called before.

Specified by:
lockRead in interface ReferralManager

lockWrite

public void lockWrite()
Get a write-lock on the referralManager. No write operation can be done on the referralManager if this method is not called before.

Specified by:
lockWrite in interface ReferralManager

unlock

public void unlock()
Release the read-write lock on the referralManager. This method must be called after having read or modified the ReferralManager

Specified by:
unlock in interface ReferralManager

addReferral

public void addReferral(org.apache.directory.shared.ldap.entry.ServerEntry entry)

Specified by:
addReferral in interface ReferralManager

init

public void init(DirectoryService directoryService,
                 java.lang.String... suffixes)
          throws java.lang.Exception

Specified by:
init in interface ReferralManager
Throws:
java.lang.Exception

remove

public void remove(DirectoryService directoryService,
                   org.apache.directory.shared.ldap.name.DN suffix)
            throws java.lang.Exception

Specified by:
remove in interface ReferralManager
Throws:
java.lang.Exception

hasParentReferral

public boolean hasParentReferral(org.apache.directory.shared.ldap.name.DN dn)

Specified by:
hasParentReferral in interface ReferralManager

getParentReferral

public org.apache.directory.shared.ldap.entry.ServerEntry getParentReferral(org.apache.directory.shared.ldap.name.DN dn)

Specified by:
getParentReferral in interface ReferralManager

isReferral

public boolean isReferral(org.apache.directory.shared.ldap.name.DN dn)

Specified by:
isReferral in interface ReferralManager

removeReferral

public void removeReferral(org.apache.directory.shared.ldap.entry.ServerEntry entry)

Specified by:
removeReferral in interface ReferralManager


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.