Examples of PageScriptSessionFilter


Examples of org.directwebremoting.extend.PageScriptSessionFilter

    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

Examples of org.directwebremoting.extend.PageScriptSessionFilter

     */
    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

Examples of org.directwebremoting.extend.PageScriptSessionFilter

     * @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

Examples of org.directwebremoting.extend.PageScriptSessionFilter

     */
    public static void withCurrentPageFiltered(ScriptSessionFilter filter, Runnable task)
    {
        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

Examples of org.directwebremoting.extend.PageScriptSessionFilter

     * @param task A code block to execute
     */
    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

Examples of org.directwebremoting.extend.PageScriptSessionFilter

     * 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 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

Examples of org.directwebremoting.extend.PageScriptSessionFilter

     */
    public Collection<ScriptSession> getScriptSessionsByPage(String url)
    {
        List<ScriptSession> matching = new ArrayList<ScriptSession>();
        Collection<ScriptSession> allScriptSessions = getScriptSessionManager().getAllScriptSessions();
        ScriptSessionFilter filter = new PageScriptSessionFilter(this, url);

        for (ScriptSession session : allScriptSessions)
        {
            if (filter.match(session))
            {
                matching.add(session);
            }
        }

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.