Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.directwebremoting.impl
Class StartupUtil

    java.lang.Object
      org.directwebremoting.impl.StartupUtil

    public class StartupUtil

extends java.lang.Object

Some utilities to help get DWR up and running

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

Constructor Summary
`StartupUtil()`

Method Summary
`static ServerContextFactory.ServerContextBuilder` | `initServerContext(javax.servlet.ServletConfig servletConfig, javax.servlet.ServletContext servletContext, Container container)` Get the `ServerContextFactory.ServerContextBuilder` out of the `Container`, configure it and use it to configure the `ServerContextFactory`
`static WebContextFactory.WebContextBuilder` | `initWebContext(javax.servlet.ServletConfig servletConfig, javax.servlet.ServletContext servletContext, Container container)` Get the `WebContextFactory.WebContextBuilder` out of the `Container`, configure it (call WebContextBuilder#set()) and use it to configure the `WebContextFactory`.
`static void` | `logStartup(javax.servlet.ServletConfig config)` Some logging so we have a good clue what we are working with.
`void` | `outOfContainerDestroy(Container container)` Clean up the current thread when `outOfContainerInit()` has been called.
`Container` | `outOfContainerInit()` A way to setup DWR outside of any Containers.
`static void` | `setupLogging(javax.servlet.ServletConfig servletConfig, javax.servlet.http.HttpServlet servlet)` We have some special logging classes to maintain an optional dependence on commons-logging.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StartupUtil

    public StartupUtil()

Method Detail

### outOfContainerInit

    public Container outOfContainerInit()
                                 throws javax.servlet.ServletException

  A way to setup DWR outside of any Containers. This method can also serve as a template for in container code wanting to get DWR setup. Callers of this method should clean up after themselves by calling `outOfContainerDestroy(Container)`

  Returns:
    A new initialized container.
  Throws:
    `javax.servlet.ServletException` - If the setup fails.

### outOfContainerDestroy

    public void outOfContainerDestroy(Container container)

  Clean up the current thread when `outOfContainerInit()` has been called.

  Parameters:
    `container` - The container created by `outOfContainerInit()`.

### logStartup

    public static void logStartup(javax.servlet.ServletConfig config)

  Some logging so we have a good clue what we are working with.

  Parameters:
    `config` - The servlet config

### initWebContext

    public static WebContextFactory.WebContextBuilder initWebContext(javax.servlet.ServletConfig servletConfig,
                                                                     javax.servlet.ServletContext servletContext,
                                                                     Container container)

  Get the `WebContextFactory.WebContextBuilder` out of the `Container`, configure it (call WebContextBuilder#set()) and use it to configure the `WebContextFactory`.

  Parameters:
    `servletConfig` - The servlet configuration
    `servletContext` - The servlet context
    `servlet` - The servlet that we are running under
    `container` - The container to save in the ServletContext
  Returns:
    a new WebContextBuilder

### initServerContext

    public static ServerContextFactory.ServerContextBuilder initServerContext(javax.servlet.ServletConfig servletConfig,
                                                                              javax.servlet.ServletContext servletContext,
                                                                              Container container)

  Get the `ServerContextFactory.ServerContextBuilder` out of the `Container`, configure it and use it to configure the `ServerContextFactory`

  Parameters:
    `servletConfig` - The servlet configuration
    `servletContext` - The servlet context
    `container` - The container to save in the ServletContext
  Returns:
    The newly created ServerContextBuilder

### setupLogging

    public static void setupLogging(javax.servlet.ServletConfig servletConfig,
                                    javax.servlet.http.HttpServlet servlet)

  We have some special logging classes to maintain an optional dependence on commons-logging. This sets the servlet for when this is not available.

  Parameters:
    `servletConfig` - The servlet configuration
    `servlet` - The servlet that we are running under

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¬ 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD