Class AbstractRequestTask<C extends AbstractRequestTask.ProcessContext>

    • Constructor Detail

      • AbstractRequestTask

        protected AbstractRequestTask()
        Nothing is done for now.
    • Method Detail

      • getRequestQueueLimit

        protected int getRequestQueueLimit()
        Returns:
        0 indicates no limit, value greater than 0 will block the threads pushing new request if the limit is reached until there is again possibility to push.
      • getProcessContext

        protected C getProcessContext()
        Gets the context given for each request to process.
        Returns:
        the instance of process context.
      • processRequest

        protected void processRequest​(AbstractRequestTask.Request<C> request)
                               throws org.silverpeas.kernel.SilverpeasException
        Processes the given request.
        Useful for a task which needs to perform some stuffs around the process.
        Parameters:
        request - the request to process.
        Throws:
        org.silverpeas.kernel.SilverpeasException - on error.
      • afterNoMoreRequest

        protected void afterNoMoreRequest()
        Invoked when it does not exist AbstractRequestTask.Request to process anymore. Is is called in any case, even if a severe error has been thrown.