com.atlassian.crowd.manager.directory.monitor.poller
Interface DirectoryPollerManager

All Known Implementing Classes:
DirectoryPollerManagerImpl

public interface DirectoryPollerManager

Manager for adding and removing DirectoryPollers. The pollers are scheduled via the Quartz/Spring scheduling subsystem. Implementations are used in a thread-safe manner by the DirectoryMonitorManager.


Method Summary
 void addPoller(DirectoryPoller poller)
          Adds a configured DirectoryPoller to the scheduler.
 boolean hasPoller(long directoryID)
          Checks whether a DirectoryPoller is scheduled to poll a given directory.
 void removeAllPollers()
          Attempts to unregister all registered pollers.
 boolean removePoller(long directoryID)
          Removes the DirectoryPoller from the scheduler if one exists for the given directory.
 

Method Detail

addPoller

void addPoller(DirectoryPoller poller)
               throws DirectoryMonitorRegistrationException
Adds a configured DirectoryPoller to the scheduler.

Parameters:
poller - configured DirectoryPoller.
Throws:
DirectoryMonitorRegistrationException - error registering poller with scheduler.

hasPoller

boolean hasPoller(long directoryID)
Checks whether a DirectoryPoller is scheduled to poll a given directory.

Parameters:
directoryID - directory ID.
Returns:
true if and only if a poller has been scheduled.

removePoller

boolean removePoller(long directoryID)
                     throws DirectoryMonitorUnregistrationException
Removes the DirectoryPoller from the scheduler if one exists for the given directory.

Parameters:
directoryID - directory ID.
Returns:
true if and only if a poller existed and was removed from polling the given directory.
Throws:
DirectoryMonitorUnregistrationException

removeAllPollers

void removeAllPollers()
Attempts to unregister all registered pollers. Skips over any directories that fail unregistration.



Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.