org.directwebremoting.extend
Interface RealScriptSession

All Superinterfaces:
ScriptSession
All Known Implementing Classes:
DefaultScriptSession

public interface RealScriptSession
extends ScriptSession

RealScriptSession is the real interface that should be implemented in place of ScriptSession. It includes methods required by the guts of DWR, that are not needed by normal users.

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

Nested Class Summary
static interface RealScriptSession.Scripts
          Data class combining script list with offset.
 
Method Summary
 void clearSleeper(Sleeper sleeper)
          Remove Sleeper.
 void confirmScripts(long scriptIndex)
          Confirms that the client has received all scripts up to and including the supplied index so that script data may be purged.
 RealScriptSession.Scripts getScripts(long fromScriptIndex)
          Get queued scripts starting from the supplied index.
 java.lang.String getWindowName()
          Accessor for the name attached to this window
 void setPage(java.lang.String page)
          Set a new page for the ScriptSession (in case of HTML pushState)
 void setSleeper(Sleeper sleeper)
          While a Marshaller is processing a request it can register a Sleeper with the ScriptSession to say - "tell me when there is new data"
 void setWindowName(java.lang.String windowName)
          If the global parameter avoid2ConnectionLimitWithWindowName == true then we need to keep a track of the names of the windows that connect to us
 void updateLastAccessedTime()
          Called whenever a browser accesses this ScriptSession to ensure that the session does not timeout before it should.
 
Methods inherited from interface org.directwebremoting.ScriptSession
addScript, getAttribute, getAttributeNames, getCreationTime, getId, getLastAccessedTime, getPage, invalidate, isInvalidated, removeAttribute, setAttribute
 

Method Detail

setSleeper

void setSleeper(Sleeper sleeper)
While a Marshaller is processing a request it can register a Sleeper with the ScriptSession to say - "tell me when there is new data"


clearSleeper

void clearSleeper(Sleeper sleeper)
Remove Sleeper.


getScripts

RealScriptSession.Scripts getScripts(long fromScriptIndex)
Get queued scripts starting from the supplied index.

Parameters:
fromScriptIndex - start index
Returns:
a Script instance containing the scripts

confirmScripts

void confirmScripts(long scriptIndex)
Confirms that the client has received all scripts up to and including the supplied index so that script data may be purged.

Parameters:
scriptIndex - last index that can be purged

updateLastAccessedTime

void updateLastAccessedTime()
Called whenever a browser accesses this ScriptSession to ensure that the session does not timeout before it should.


setWindowName

void setWindowName(java.lang.String windowName)
If the global parameter avoid2ConnectionLimitWithWindowName == true then we need to keep a track of the names of the windows that connect to us

Parameters:
windowName - The new name for the window that spawned this Session

getWindowName

java.lang.String getWindowName()
Accessor for the name attached to this window


setPage

void setPage(java.lang.String page)
Set a new page for the ScriptSession (in case of HTML pushState)


Copyright ยจ 2008