Class RequestHandlerExecutor


  • public abstract class RequestHandlerExecutor
    extends java.lang.Object
    Manages executions of IRequestHandlers.
    Author:
    Matej Knopp, igor.vaynberg
    • Constructor Detail

      • RequestHandlerExecutor

        public RequestHandlerExecutor()
    • Method Detail

      • getActive

        public IRequestHandler getActive()
        Get the handler currently executed.
        Returns:
        active handler
      • respond

        protected abstract void respond​(IRequestHandler handler)
        Allows the request handler to respond to the request
        Parameters:
        handler -
      • schedule

        public void schedule​(IRequestHandler handler)
        Schedules the handler after the current one
        Parameters:
        handler -
      • next

        public IRequestHandler next()
        Returns:
        scheduled request handler after the current one
      • replaceAll

        public void replaceAll​(IRequestHandler handler)
        Replaces all request handlers on the stack with the specified one and executes it. If there are any request handlers currently executing (this method is called from inside IRequestHandler.respond(IRequestCycle)) the execution is interrupted via an exception.
        Parameters:
        handler -
      • detach

        public void detach()
        Detaches all request handlers
      • detach

        protected abstract void detach​(IRequestHandler handler)
        Allows the request handler to detach
        Parameters:
        handler -