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.Script
          Interface for queued script info class.
 
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.Script getScript(long scriptIndex)
          Get queued script from the supplied index.
 void setHttpSessionId(java.lang.String httpSessionId)
          Set a new HttpSession id for the ScriptSession
 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 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
addRunnable, addScript, getAttribute, getAttributeNames, getCreationTime, getHttpSessionId, 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.


getScript

RealScriptSession.Script getScript(long scriptIndex)
Get queued script from the supplied index.

Parameters:
scriptIndex - index
Returns:
a Script instance or null if nothing in queue

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.


setPage

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


setHttpSessionId

void setHttpSessionId(java.lang.String httpSessionId)
Set a new HttpSession id for the ScriptSession


Copyright ยจ 2008