com.atlassian.studio.confluence.integration.crowd
Class CrowdNotifyServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.atlassian.studio.confluence.integration.crowd.CrowdNotifyServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class CrowdNotifyServlet
extends javax.servlet.http.HttpServlet

Servlet that syncs the crowd cache and resets the user count cache. If a request is received while a sync is already in progress, at most one sync will be queued for subsequent execution.

See Also:
Serialized Form

Constructor Summary
CrowdNotifyServlet(com.atlassian.crowd.manager.directory.DirectoryManager directoryManager, UserChecker userChecker)
           
CrowdNotifyServlet(com.atlassian.crowd.manager.directory.DirectoryManager directoryManager, UserChecker userChecker, java.util.concurrent.ExecutorService executor)
           
 
Method Summary
 void destroy()
           
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Ensures a Crowd sync will run in the near future.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrowdNotifyServlet

public CrowdNotifyServlet(com.atlassian.crowd.manager.directory.DirectoryManager directoryManager,
                          UserChecker userChecker)

CrowdNotifyServlet

public CrowdNotifyServlet(com.atlassian.crowd.manager.directory.DirectoryManager directoryManager,
                          UserChecker userChecker,
                          java.util.concurrent.ExecutorService executor)
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException,
                      java.io.IOException
Ensures a Crowd sync will run in the near future. Does not block. Invoked by Horde/Crowd when the userbase changes.

Internally, there are 3 valid paths which will result in an HTTP OK response:

  1. No sync is currently executing, in which case a sync is scheduled to run immediately.
  2. A sync is currently executing, but no subsequent sync is queued. In this case, a sync is queued to run after the current sync.
  3. A sync is currently executing and a subsequent sync is already queued. In this case, no further work is required: the queued sync will occur after this request has been received, and will therefore pick up the userbase change communicated by this request.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException


Copyright © 2003-2014 Atlassian. All Rights Reserved.