Package org.directwebremoting.extend

Examples of org.directwebremoting.extend.TaskDispatcher


     * session, use {@link #withSession}.
     * @param task A code block to execute
     */
    public static void withAllSessions(Runnable task)
    {
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(ServerContextFactory.get());
        taskDispatcher.dispatchTask(new AllScriptSessionFilter(), task);
    }
View Full Code Here


     * For 99% of cases the former method will be much simpler to use.
     * @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);
    }
View Full Code Here

     * receive the update.
     * @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);
    }
View Full Code Here

     * For 99% of cases the former method will be much simpler to use.
     * @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);
    }
View Full Code Here

     */
    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);
    }
View Full Code Here

     * @param task A code block to execute
     */
    public static void withPage(String page, Runnable task)
    {
        ServerContext serverContext = ServerContextFactory.get();
        TaskDispatcher taskDispatcher = TaskDispatcherFactory.get(serverContext);
        taskDispatcher.dispatchTask(new PageScriptSessionFilter(serverContext, page), task);
    }
View Full Code Here

     * For 99% of cases the former method will be much simpler to use.
     * @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);
    }
View Full Code Here

    {
        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);
    }
View Full Code Here

    public static void withPageFiltered(String page, ScriptSessionFilter filter, Runnable task)
    {
        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);
    }
View Full Code Here

     */
    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);
    }
View Full Code Here

TOP

Related Classes of org.directwebremoting.extend.TaskDispatcher

Copyright © 2018 www.massapicom. 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.