org.directwebremoting.extend
Class TaskDispatcherFactory

java.lang.Object
  extended by org.directwebremoting.extend.TaskDispatcherFactory

public class TaskDispatcherFactory
extends java.lang.Object

A class to help with the use of Callbacks

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Nested Class Summary
static interface TaskDispatcherFactory.TaskDispatcherBuilder
          Hack to get around Generics not being implemented by erasure
 
Constructor Summary
TaskDispatcherFactory()
           
 
Method Summary
static TaskDispatcher attach(Container container)
          Internal method to allow us to get the Builder from which we will get TaskDispatcher objects.
static TaskDispatcher get()
          Accessor for the current TaskDispatcher.
static TaskDispatcher get(ServerContext ctx)
          Accessor for the current TaskDispatcher in more complex setups.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskDispatcherFactory

public TaskDispatcherFactory()
Method Detail

get

public static TaskDispatcher get()
Accessor for the current TaskDispatcher.

Returns:
The current TaskDispatcher.

get

public static TaskDispatcher get(ServerContext ctx)
Accessor for the current TaskDispatcher in more complex setups. For some setups DWR may not be able to discover the correct environment (i.e. ServletContext), so we need to tell it. This generally happens if you have DWR configured twice in a single context. Unless you are writing code that someone else will configure, it is probably safe to use the simpler get() method.

Parameters:
ctx - The servlet context to allow us to bootstrap
Returns:
The current TaskDispatcher.

attach

public static TaskDispatcher attach(Container container)
Internal method to allow us to get the Builder from which we will get TaskDispatcher objects. Do NOT call this method from outside of DWR.


Copyright 2008