Examples of dispatchTask()


Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

     * @param task A code block to execute
     */
    public static void withAllSessions(Runnable task)
    {
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(ServerContextFactory.get());
        taskDispatcher.dispatchTask(new AllScriptSessionFilter(), task);
    }

    /**
     * As {@link #withAllSessions(Runnable)}, but for use when there is more
     * than one copy of DWR in the ServletContext.
View Full Code Here

Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

     * @param serverContext The specific DWR context in which to execute
     */
    public static void withAllSessions(ServerContext serverContext, Runnable task)
    {
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(serverContext);
        taskDispatcher.dispatchTask(new AllScriptSessionFilter(), task);
    }

    /**
     * Execute a task an send the output to a subset of the total list of users.
     * The {@link ScriptSessionFilter} defines which subset.
View Full Code Here

Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

     * @param task A code block to execute
     */
    public static void withAllSessionsFiltered(ScriptSessionFilter filter, Runnable task)
    {
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(ServerContextFactory.get());
        taskDispatcher.dispatchTask(filter, task);
    }

    /**
     * As {@link #withAllSessionsFiltered(ScriptSessionFilter, Runnable)}, but
     * for use when there is more than one copy of DWR in the ServletContext.
View Full Code Here

Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

     * @param serverContext The specific DWR context in which to execute
     */
    public static void withAllSessionsFiltered(ServerContext serverContext, ScriptSessionFilter filter, Runnable task)
    {
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(serverContext);
        taskDispatcher.dispatchTask(filter, task);
    }

    /**
     * Execute a task and aim the output at all the browser windows open at the
     * same page as the current request. No further filtering is performed.
View Full Code Here

Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

    public static void withCurrentPage(Runnable task)
    {
        WebContext webContext = WebContextFactory.get();
        String page = webContext.getCurrentPage();
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(webContext);
        taskDispatcher.dispatchTask(new PageScriptSessionFilter(webContext, page), task);
    }

    /**
     * Execute a task and aim the output at all the browser windows open at a
     * given page in this web application. No further filtering is performed.
View Full Code Here

Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

     */
    public static void withPage(String page, Runnable task)
    {
        ServerContext serverContext = ServerContextFactory.get();
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(serverContext);
        taskDispatcher.dispatchTask(new PageScriptSessionFilter(serverContext, page), task);
    }

    /**
     * As {@link #withPage(String, Runnable)}, but for use when there is more
     * than one copy of DWR in the ServletContext.
View Full Code Here

Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

     * @param serverContext The specific DWR context in which to execute
     */
    public static void withPage(ServerContext serverContext, String page, Runnable task)
    {
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(serverContext);
        taskDispatcher.dispatchTask(new PageScriptSessionFilter(serverContext, page), task);
    }

    /**
     * Execute a task and aim the output at a subset of the browser windows open
     * at the same page as the current request. The filter allows you to select
View Full Code Here

Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

        WebContext webContext = WebContextFactory.get();
        String page = webContext.getCurrentPage();
        ScriptSessionFilter pageFilter = new PageScriptSessionFilter(webContext, page);
        ScriptSessionFilter realFilter = new AndScriptSessionFilter(pageFilter, filter);
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(webContext);
        taskDispatcher.dispatchTask(realFilter, task);
    }

    /**
     * Execute a task and aim the output at a subset of the users on a page.
     * This method is useful when you have a small number of pages that each
View Full Code Here

Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

    {
        ServerContext serverContext = ServerContextFactory.get();
        ScriptSessionFilter pageFilter = new PageScriptSessionFilter(serverContext, page);
        ScriptSessionFilter realFilter = new AndScriptSessionFilter(pageFilter, filter);
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(serverContext);
        taskDispatcher.dispatchTask(realFilter, task);
    }

    /**
     * As {@link #withPageFiltered}, but for use when there is more than one copy of DWR
     * in a ServletContext.
View Full Code Here

Examples of org.directwebremoting.extend.TaskDispatcher.dispatchTask()

    public static void withPageFiltered(ServerContext serverContext, String page, ScriptSessionFilter filter, Runnable task)
    {
        ScriptSessionFilter pageFilter = new PageScriptSessionFilter(serverContext, page);
        ScriptSessionFilter realFilter = new AndScriptSessionFilter(pageFilter, filter);
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(serverContext);
        taskDispatcher.dispatchTask(realFilter, task);
    }

    /**
     * Execute a task and aim the output at a specific script session. This
     * method is likely to be useful for directed updates that originate away
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.