org.directwebremoting
Class ServerContextFactory

java.lang.Object
  extended by org.directwebremoting.ServerContextFactory

public class ServerContextFactory
extends java.lang.Object

Accessor for the current ServerContext.

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

Nested Class Summary
static interface ServerContextFactory.ServerContextBuilder
          Hack to get around Generics not being implemented by erasure
 
Constructor Summary
ServerContextFactory()
           
 
Method Summary
static ServerContext attach(Container container)
          Internal method to allow us to get the Builder from which we will get ServerContext objects.
static ServerContext get()
          Accessor for the current ServerContext.
static ServerContext get(javax.servlet.ServletContext ctx)
          Deprecated. Use the plain ServerContextFactory.get() version
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerContextFactory

public ServerContextFactory()
Method Detail

get

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

Returns:
The current ServerContext.

get

@Deprecated
public static ServerContext get(javax.servlet.ServletContext ctx)
Deprecated. Use the plain ServerContextFactory.get() version

This method was designed to support more complex DWR setups, although it is unlikely that it ever did this properly. If you have multiple DWR servlets in a single ServletContext or wish to do cross-context access to DWR then please contact the DWR mailing list.

Parameters:
ctx - The servlet context to allow us to bootstrap
Returns:
The current ServerContext.
See Also:
get()

attach

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


Copyright 2008