/** * Execute the given handler. * * @param handler handler to be executed * @return handler to be executed next * @throws ReplaceHandlerException if another handler should replace the given handler for execution */ public IRequestHandler execute(final IRequestHandler handler) { active = handler; try { respond(handler); } finally { active = null; inactiveRequestHandlers.add(handler); } IRequestHandler scheduled = scheduledAfterCurrent; scheduledAfterCurrent = null; return scheduled; }
/** * Execute the given handler. * * @param handler handler to be executed * @return handler to be executed next * @throws ReplaceHandlerException if another handler should replace the given handler for execution */ public IRequestHandler execute(final IRequestHandler handler) { active = handler; try { respond(handler); } finally { active = null; inactiveRequestHandlers.add(handler); } IRequestHandler scheduled = scheduledAfterCurrent; scheduledAfterCurrent = null; return scheduled; }