org.directwebremoting.extend.TaskDispatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dwr Show documentation
Show all versions of dwr Show documentation
DWR is easy Ajax for Java. It makes it simple to call Java code directly from Javascript.
It gets rid of almost all the boilerplate code between the web browser and your Java code.
This version 4.0.2 works with Jakarta Servlet 4.0.2.
package org.directwebremoting.extend;
import java.util.Collection;
import org.directwebremoting.ScriptSession;
import org.directwebremoting.ScriptSessionFilter;
/**
* We would like to do some reverse ajax work, but need something to find the
* ScriptSessions add act on them all.
* @author Joe Walker [joe at getahead dot ltd dot uk]
*/
public interface TaskDispatcher
{
/**
* Take a runnable action and run it against every {@link ScriptSession}
* that matches a specified filter.
* @param filter ...
* @param task ...
*/
void dispatchTask(ScriptSessionFilter filter, Runnable task);
/**
* This method discovers the sessions that are currently being targeted
* by browser updates.
*
* It will generally only be useful to authors of reverse ajax UI proxy
* APIs. Using it directly may cause scaling problems
* @return The list of current browser windows.
*/
Collection getTargetSessions();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy