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 DefaultServerContext

    java.lang.Object
      org.directwebremoting.impl.DefaultServerContext

All Implemented Interfaces:
  ServerContext

Direct Known Subclasses:
  DefaultWebContext

    public class DefaultServerContext

extends java.lang.Object
implements ServerContext

The Default implementation of ServerContext

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

Constructor Summary
`DefaultServerContext(javax.servlet.ServletConfig config, javax.servlet.ServletContext context, Container container)` Build a new DefaultServerContext

Method Summary
`java.util.Collection` | `getAllScriptSessions()` Get a list of all the ScriptSessions known to this server at the given time.
`Container` | `getContainer()` Accessor for the IoC container.
`java.util.Collection` | `getScriptSessionsByPage(java.lang.String otherPage)` Get a list of all ScriptSessions on a given page.
`javax.servlet.ServletConfig` | `getServletConfig()` Accessor for the servlet config.
`javax.servlet.ServletContext` | `getServletContext()` Returns the ServletContext to which this session belongs.
`java.lang.String` | `getVersion()` Fish the version number out of the dwr.properties file.

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

Constructor Detail

### DefaultServerContext

    public DefaultServerContext(javax.servlet.ServletConfig config,
                                javax.servlet.ServletContext context,
                                Container container)

  Build a new DefaultServerContext

  Parameters:
    `config` - The servlet configuration
    `context` - The servlet context
    `container` - The IoC container

Method Detail

### getAllScriptSessions

    public java.util.Collection getAllScriptSessions()

  Description copied from interface: `ServerContext`
  Get a list of all the ScriptSessions known to this server at the given time. Note that the list of known sessions is continually changing so it is possible that the list will be out of date by the time it is used. For this reason you should check that getScriptSession(String id) returns something non null.

  Specified by:
    `getAllScriptSessions` in interface `ServerContext`
  Returns:
    A collection of all the ScriptSessions.

### getContainer

    public Container getContainer()

  Description copied from interface: `ServerContext`
  Accessor for the IoC container.

  Specified by:
    `getContainer` in interface `ServerContext`
  Returns:
    The IoC container that created the interface implementations.

### getScriptSessionsByPage

    public java.util.Collection getScriptSessionsByPage(java.lang.String otherPage)

  Description copied from interface: `ServerContext`
  Get a list of all ScriptSessions on a given page. Note that the list of known sessions is continually changing so it is possible that the list will be out of date by the time it is used. For this reason you should check that getScriptSession(String id) returns something non null.

  Specified by:
    `getScriptSessionsByPage` in interface `ServerContext`
  Parameters:
    `otherPage` - The URL including 'http://', up to (but not including) '?' or '#'
  Returns:
    A collection of all the ScriptSessions.

### getServletConfig

    public javax.servlet.ServletConfig getServletConfig()

  Description copied from interface: `ServerContext`
  Accessor for the servlet config.

  Specified by:
    `getServletConfig` in interface `ServerContext`
  Returns:
    Returns the config.

### getServletContext

    public javax.servlet.ServletContext getServletContext()

  Description copied from interface: `ServerContext`
  Returns the ServletContext to which this session belongs.

  Specified by:
    `getServletContext` in interface `ServerContext`
  Returns:
    The servlet context information.

### getVersion

    public java.lang.String getVersion()

  Description copied from interface: `ServerContext`
  Fish the version number out of the dwr.properties file.

  Specified by:
    `getVersion` in interface `ServerContext`
  Returns:
    The current version number.

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