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

## uk.ltd.getahead.dwr
Class ExecutionContext

    java.lang.Object
      uk.ltd.getahead.dwr.ExecutionContext

All Implemented Interfaces:
  ServerContext, WebContext

Deprecated. Use WebContext / WebContextFactory for better results

    public class ExecutionContext

extends java.lang.Object
implements WebContext

Class to enable us to access servlet parameters.

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

Field Summary

Fields inherited from interface org.directwebremoting.WebContext
`ATTRIBUTE_DWR`

Method Summary
`java.lang.String` | `forwardToString(java.lang.String url)` Deprecated. Forward a request to a given URL and catch the data written to it.
`static ExecutionContext` | `get()` Deprecated. Use WebContextFactory.get() for better results
`java.util.Collection` | `getAllScriptSessions()` Deprecated. Get a list of all the ScriptSessions known to this server at the given time.
`Container` | `getContainer()` Deprecated. Accessor for the IoC container.
`java.lang.String` | `getCurrentPage()` Deprecated. What is the URL of the current page.
`javax.servlet.http.HttpServletRequest` | `getHttpServletRequest()` Deprecated. Accessor for the http request information.
`javax.servlet.http.HttpServletResponse` | `getHttpServletResponse()` Deprecated. Accessor for the http response bean.
`ScriptSession` | `getScriptSession()` Deprecated. Get the script session that represents the currently viewed page in the same way that an HttpSession represents a cookie.
`java.util.Collection` | `getScriptSessionsByPage(java.lang.String page)` Deprecated. Get a list of all ScriptSessions on a given page.
`javax.servlet.ServletConfig` | `getServletConfig()` Deprecated. Accessor for the servlet config.
`javax.servlet.ServletContext` | `getServletContext()` Deprecated. Returns the ServletContext to which this session belongs.
`javax.servlet.http.HttpSession` | `getSession()` Deprecated. Returns the current session associated with this request, or if the request does not have a session, creates one.
`javax.servlet.http.HttpSession` | `getSession(boolean create)` Deprecated. Returns the current HttpSession associated with this request or, if there is no current session and create is true, returns a new session.
`java.lang.String` | `getVersion()` Deprecated. Fish the version number out of the dwr.properties file.
`void` | `setCurrentPageInformation(java.lang.String page, java.lang.String scriptSessionId)` Deprecated. For system use only: This method allows the system to fill in the session id and page id when they are discovered.

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

Method Detail

### getSession

    public javax.servlet.http.HttpSession getSession()

  Deprecated.
  Description copied from interface: `WebContext`
  Returns the current session associated with this request, or if the request does not have a session, creates one.

  Specified by:
    `getSession` in interface `WebContext`
  Returns:
    Returns the http session.
  See Also:
    `HttpServletRequest.getSession()`

### getSession

    public javax.servlet.http.HttpSession getSession(boolean create)

  Deprecated.
  Description copied from interface: `WebContext`
  Returns the current HttpSession associated with this request or, if there is no current session and create is true, returns a new session. If create is false and the request has no valid HttpSession, this method returns null.

  Specified by:
    `getSession` in interface `WebContext`
  Parameters:
    `create` - false to return null if there's no current session
  Returns:
    the session associated with this request
  See Also:
    `HttpServletRequest.getSession(boolean)`

### getServletConfig

    public javax.servlet.ServletConfig getServletConfig()

  Deprecated.
  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()

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

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

### getHttpServletRequest

    public javax.servlet.http.HttpServletRequest getHttpServletRequest()

  Deprecated.
  Description copied from interface: `WebContext`
  Accessor for the http request information.

  Specified by:
    `getHttpServletRequest` in interface `WebContext`
  Returns:
    Returns the request.

### getHttpServletResponse

    public javax.servlet.http.HttpServletResponse getHttpServletResponse()

  Deprecated.
  Description copied from interface: `WebContext`
  Accessor for the http response bean.

  You can't use this request to directly reply to the response or to add headers or cookies.

  Specified by:
    `getHttpServletResponse` in interface `WebContext`
  Returns:
    Returns the response.

### forwardToString

    public java.lang.String forwardToString(java.lang.String url)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException

  Deprecated.
  Description copied from interface: `WebContext`
  Forward a request to a given URL and catch the data written to it. It is possible to distinguish requests that arrive normally and requests that come from a DWR forwardToString() by the presence of a request attribute. Before the request is forwarded, DWR will call:

       request.setAttribute(WebContext.ATTRIBUTE_DWR, Boolean.TRUE);

  Specified by:
    `forwardToString` in interface `WebContext`
  Parameters:
    `url` - The URL to forward to
  Returns:
    The text that results from forwarding to the given URL
  Throws:
    `javax.servlet.ServletException` - if the target resource throws this exception
    `java.io.IOException` - if the target resource throws this exception

### getVersion

    public java.lang.String getVersion()

  Deprecated.
  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.

### getScriptSession

    public ScriptSession getScriptSession()

  Deprecated.
  Description copied from interface: `WebContext`
  Get the script session that represents the currently viewed page in the same way that an HttpSession represents a cookie.

  Specified by:
    `getScriptSession` in interface `WebContext`
  Returns:
    A browser object for this user

### getAllScriptSessions

    public java.util.Collection getAllScriptSessions()

  Deprecated.
  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.

### getScriptSessionsByPage

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

  Deprecated.
  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:
    `page` - The URL including 'http://', up to (but not including) '?' or '#'
  Returns:
    A collection of all the ScriptSessions.

### getContainer

    public Container getContainer()

  Deprecated.
  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.

### setCurrentPageInformation

    public void setCurrentPageInformation(java.lang.String page,
                                          java.lang.String scriptSessionId)

  Deprecated.
  Description copied from interface: `WebContext`
  For system use only: This method allows the system to fill in the session id and page id when they are discovered.

  Specified by:
    `setCurrentPageInformation` in interface `WebContext`
  Parameters:
    `page` - The URL of the current page
    `scriptSessionId` - The session id passed in by the browser

### getCurrentPage

    public java.lang.String getCurrentPage()

  Deprecated.
  Description copied from interface: `WebContext`
  What is the URL of the current page. This includes 'http://', up to (but not including) '?' or '#'

  Specified by:
    `getCurrentPage` in interface `WebContext`
  Returns:
    The URL of the current page

### get

    public static ExecutionContext get()

  Deprecated. Use WebContextFactory.get() for better results

  Accessor for the current ExecutionContext.

  Returns:
    The current ExecutionContext or null if the current thread was not started by DWR.

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