org.apache.ldap.server.event
Class EventService

java.lang.Object
  extended by org.apache.ldap.server.interceptor.BaseInterceptor
      extended by org.apache.ldap.server.event.EventService
All Implemented Interfaces:
Interceptor

public class EventService
extends BaseInterceptor

An interceptor based serivice for notifying NamingListeners of EventContext and EventDirContext changes.

Version:
$Rev$
Author:
Apache Directory Project

Constructor Summary
EventService()
           
 
Method Summary
 void add(NextInterceptor next, java.lang.String upName, javax.naming.Name normName, javax.naming.directory.Attributes entry)
          Filters DirectoryPartition.add(String, Name, Attributes) call.
 void addNamingListener(javax.naming.event.EventContext ctx, javax.naming.Name name, org.apache.ldap.common.filter.ExprNode filter, javax.naming.directory.SearchControls searchControls, javax.naming.event.NamingListener namingListener)
          Registers a NamingListener with this service for notification of change.
 void delete(NextInterceptor next, javax.naming.Name name)
          Filters DirectoryPartition.delete(Name) call.
 void init(DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg)
          This method does nothing by default.
 void modify(NextInterceptor next, javax.naming.Name name, int modOp, javax.naming.directory.Attributes mods)
          Filters DirectoryPartition.modify(Name, int, Attributes) call.
 void modify(NextInterceptor next, javax.naming.Name name, javax.naming.directory.ModificationItem[] mods)
          Filters DirectoryPartition.modify(Name, ModificationItem[]) call.
 void modifyRn(NextInterceptor next, javax.naming.Name name, java.lang.String newRn, boolean deleteOldRn)
          Filters DirectoryPartition.modifyRn(Name, String, boolean) call.
 void move(NextInterceptor next, javax.naming.Name oriChildName, javax.naming.Name newParentName)
          Filters DirectoryPartition.move(Name, Name) call.
 void move(NextInterceptor next, javax.naming.Name oriChildName, javax.naming.Name newParentName, java.lang.String newRn, boolean deleteOldRn)
          Filters DirectoryPartition.move(Name, Name, String, boolean) call.
 void removeNamingListener(javax.naming.event.EventContext ctx, javax.naming.event.NamingListener namingListener)
           
 
Methods inherited from class org.apache.ldap.server.interceptor.BaseInterceptor
addContextPartition, compare, destroy, getContext, getMatchedName, getPrincipal, getRootDSE, getSuffix, hasEntry, isSuffix, list, listSuffixes, lookup, lookup, removeContextPartition, search
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventService

public EventService()
Method Detail

init

public void init(DirectoryServiceConfiguration factoryCfg,
                 InterceptorConfiguration cfg)
          throws javax.naming.NamingException
Description copied from class: BaseInterceptor
This method does nothing by default.

Specified by:
init in interface Interceptor
Overrides:
init in class BaseInterceptor
Throws:
javax.naming.NamingException

addNamingListener

public void addNamingListener(javax.naming.event.EventContext ctx,
                              javax.naming.Name name,
                              org.apache.ldap.common.filter.ExprNode filter,
                              javax.naming.directory.SearchControls searchControls,
                              javax.naming.event.NamingListener namingListener)
Registers a NamingListener with this service for notification of change.

Parameters:
ctx - the context used to register on (the source)
name - the name of the base/target
filter - the filter to use for evaluating event triggering
searchControls - the search controls to use when evaluating triggering
namingListener - the naming listener to register

removeNamingListener

public void removeNamingListener(javax.naming.event.EventContext ctx,
                                 javax.naming.event.NamingListener namingListener)

add

public void add(NextInterceptor next,
                java.lang.String upName,
                javax.naming.Name normName,
                javax.naming.directory.Attributes entry)
         throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.add(String, Name, Attributes) call.

Specified by:
add in interface Interceptor
Overrides:
add in class BaseInterceptor
Throws:
javax.naming.NamingException

delete

public void delete(NextInterceptor next,
                   javax.naming.Name name)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.delete(Name) call.

Specified by:
delete in interface Interceptor
Overrides:
delete in class BaseInterceptor
Throws:
javax.naming.NamingException

modify

public void modify(NextInterceptor next,
                   javax.naming.Name name,
                   int modOp,
                   javax.naming.directory.Attributes mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.modify(Name, int, Attributes) call.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
javax.naming.NamingException

modify

public void modify(NextInterceptor next,
                   javax.naming.Name name,
                   javax.naming.directory.ModificationItem[] mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.modify(Name, ModificationItem[]) call.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
javax.naming.NamingException

modifyRn

public void modifyRn(NextInterceptor next,
                     javax.naming.Name name,
                     java.lang.String newRn,
                     boolean deleteOldRn)
              throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.modifyRn(Name, String, boolean) call.

Specified by:
modifyRn in interface Interceptor
Overrides:
modifyRn in class BaseInterceptor
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 javax.naming.Name oriChildName,
                 javax.naming.Name newParentName,
                 java.lang.String newRn,
                 boolean deleteOldRn)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.move(Name, Name, String, boolean) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 javax.naming.Name oriChildName,
                 javax.naming.Name newParentName)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.move(Name, Name) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
javax.naming.NamingException