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 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]

Method Summary
`void` | `addScriptConduit(ScriptConduit conduit)` While a Marshaller is processing a request it can register a ScriptConduit with the ScriptSession to say - "pass scripts to me"
`java.lang.Object` | `getScriptLock()` Accessor for an object that we use to announce to people that might be waiting on output from this ScriptSession that there is some output ready for action.
`boolean` | `hasWaitingScripts()` Allows for checking to see if there is data waiting to be returned
`void` | `removeScriptConduit(ScriptConduit conduit)` Remove a ScriptConduit.
`void` | `writeScripts(ScriptConduit conduit)` We might need to send a script directly to a conduit without adding the conduit to the "open" list and then removing it directly.

Methods inherited from interface org.directwebremoting.ScriptSession
`addScript, getAttribute, getAttributeNames, getCreationTime, getId, getLastAccessedTime, invalidate, isInvalidated, removeAttribute, setAttribute`

Method Detail

### addScriptConduit

    void addScriptConduit(ScriptConduit conduit)
                          throws java.io.IOException

  While a Marshaller is processing a request it can register a ScriptConduit with the ScriptSession to say - "pass scripts to me"

  Several Marshallers may be active on the same page as a time and it doesn't really matter which gets the script. So ScriptSession should record all of the active ScriptConduits, but just pick one

  Parameters:
    `conduit` - The new ScriptConduit
  Throws:
    `java.io.IOException` - If the write to the output fails
  See Also:
    `removeScriptConduit(ScriptConduit)`

### removeScriptConduit

    void removeScriptConduit(ScriptConduit conduit)

  Remove a ScriptConduit.

  Parameters:
    `conduit` - The ScriptConduit to remove
  See Also:
    `addScriptConduit(ScriptConduit)`

### writeScripts

    void writeScripts(ScriptConduit conduit)
                      throws java.io.IOException

  We might need to send a script directly to a conduit without adding the conduit to the "open" list and then removing it directly.

  Parameters:
    `conduit` - The conduit to write to
  Throws:
    `java.io.IOException` - If writing fails

### hasWaitingScripts

    boolean hasWaitingScripts()

  Allows for checking to see if there is data waiting to be returned

  Returns:
    true if there are no waiting scripts

### getScriptLock

    java.lang.Object getScriptLock()

  Accessor for an object that we use to announce to people that might be waiting on output from this ScriptSession that there is some output ready for action. TODO: Replace this with a listener mechanism

  Returns:
    The mutex object used by the script session

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