com.atlassian.crowd.manager.directory.monitor.listener
Class DirectoryListenerManagerImpl

java.lang.Object
  extended by com.atlassian.crowd.manager.directory.monitor.listener.DirectoryListenerManagerImpl
All Implemented Interfaces:
DirectoryListenerManager

public class DirectoryListenerManagerImpl
extends java.lang.Object
implements DirectoryListenerManager


Constructor Summary
DirectoryListenerManagerImpl()
           
 
Method Summary
 void addListener(DirectoryListener listener)
          Registers a configured DirectoryListener and starts listening.
 boolean hasListener(long directoryID)
          Checks whether a DirectoryListener is currently listening.
 void removeAllListeners()
          Attempts to unregister all registered listeners.
 boolean removeListener(long directoryID)
          Unregisters the DirectoryListener and stops listening.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryListenerManagerImpl

public DirectoryListenerManagerImpl()
Method Detail

addListener

public void addListener(DirectoryListener listener)
                 throws DirectoryMonitorRegistrationException
Description copied from interface: DirectoryListenerManager
Registers a configured DirectoryListener and starts listening.

Specified by:
addListener in interface DirectoryListenerManager
Parameters:
listener - configured DirectoryListener.
Throws:
DirectoryMonitorRegistrationException - error starting listener.

hasListener

public boolean hasListener(long directoryID)
Description copied from interface: DirectoryListenerManager
Checks whether a DirectoryListener is currently listening.

Specified by:
hasListener in interface DirectoryListenerManager
Parameters:
directoryID - directory ID.
Returns:
true if and only if a listener has been successfully added.

removeListener

public boolean removeListener(long directoryID)
                       throws DirectoryMonitorUnregistrationException
Description copied from interface: DirectoryListenerManager
Unregisters the DirectoryListener and stops listening.

Specified by:
removeListener in interface DirectoryListenerManager
Parameters:
directoryID - directory ID.
Returns:
true if and only if a listener existed and was removed from listening to given directory.
Throws:
DirectoryMonitorUnregistrationException

removeAllListeners

public void removeAllListeners()
Description copied from interface: DirectoryListenerManager
Attempts to unregister all registered listeners. Skips over any directories that fail unregistration.

Specified by:
removeAllListeners in interface DirectoryListenerManager


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.