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.extend
Interface ScriptSessionManager

All Known Implementing Classes:
  DefaultScriptSessionManager

    public interface ScriptSessionManager

A ScriptSessionManager looks after a number of sessions (keyed using a Javascript variable)

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

Field Summary
`static long` | `DEFAULT_TIMEOUT_MILLIS` The default length of time a session can go unused before it automatically becomes invalid and is recycled.

Method Summary
`java.util.Collection` | `getAllScriptSessions()` Get a list of all the currently known ScriptSessions by id.
`RealScriptSession` | `getScriptSession(java.lang.String id)` For a given script session id, either create a new ScriptSession object or retrieve an existing one if one exists.
`java.util.Collection` | `getScriptSessionsByPage(java.lang.String url)` For a given script session id, either create a new ScriptSession object or retrieve an existing one if one exists.
`long` | `getScriptSessionTimeout()` Accessor for the time (in milliseconds) when unused ScriptSessions will expire
`void` | `setPageForScriptSession(RealScriptSession scriptSession, java.lang.String url)` Locate the given script session on a page
`void` | `setScriptSessionTimeout(long scriptSessionTimeout)` Accessor for the time (in milliseconds) when unused ScriptSessions will expire

Field Detail

### DEFAULT_TIMEOUT_MILLIS

    static final long DEFAULT_TIMEOUT_MILLIS

  The default length of time a session can go unused before it automatically becomes invalid and is recycled. The default is 5mins

  See Also:
    Constant Field Values

Method Detail

### getAllScriptSessions

    java.util.Collection getAllScriptSessions()

  Get a list of all the currently known ScriptSessions by id. 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.

  Returns:
    An iterator over the currently known sessions, by id

### getScriptSessionsByPage

    java.util.Collection getScriptSessionsByPage(java.lang.String url)

  For a given script session id, either create a new ScriptSession object or retrieve an existing one if one exists.

  Parameters:
    `url` - The URL including 'http://', up to (but not including) '?' or '#'
  Returns:
    A ScriptSession.

### getScriptSession

    RealScriptSession getScriptSession(java.lang.String id)

  For a given script session id, either create a new ScriptSession object or retrieve an existing one if one exists.

  Parameters:
    `id` - The id to get a ScriptSession object for
  Returns:
    A ScriptSession.

### setPageForScriptSession

    void setPageForScriptSession(RealScriptSession scriptSession,
                                 java.lang.String url)

  Locate the given script session on a page

  Parameters:
    `scriptSession` - The session to locate on a page
    `url` - The URL including 'http://', up to (but not including) '?' or '#'

### getScriptSessionTimeout

    long getScriptSessionTimeout()

  Accessor for the time (in milliseconds) when unused ScriptSessions will expire

  Returns:
    the scriptSessionTimeout

### setScriptSessionTimeout

    void setScriptSessionTimeout(long scriptSessionTimeout)

  Accessor for the time (in milliseconds) when unused ScriptSessions will expire

  Parameters:
    `scriptSessionTimeout` - the timeout to set

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