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.dwrp
Class PlainScriptConduit

    java.lang.Object
      org.directwebremoting.extend.ScriptConduit
          org.directwebremoting.dwrp.BaseScriptConduit
              org.directwebremoting.dwrp.PlainScriptConduit

All Implemented Interfaces:
  java.lang.Comparable

    public class PlainScriptConduit

extends BaseScriptConduit

A ScriptConduit for use with plain Javascript output.

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

Field Summary

Fields inherited from class org.directwebremoting.extend.ScriptConduit
`RANK_FAST, RANK_PROCEDURAL, RANK_SLOW`

Constructor Summary
`PlainScriptConduit(javax.servlet.http.HttpServletResponse response, java.lang.String batchId, ConverterManager converterManager)` Simple ctor

Method Summary
`boolean` | `addScript(ScriptBuffer scriptBuffer)` Add a script to the list bound for remote execution.
`void` | `beginStream()` Called when we are initially setting up the stream.
`void` | `endStream()` Called when we are shutting the stream down.

Methods inherited from class org.directwebremoting.dwrp.BaseScriptConduit
`close`

Methods inherited from class org.directwebremoting.extend.ScriptConduit
`compareTo, getRank, toString`

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

Constructor Detail

### PlainScriptConduit

    public PlainScriptConduit(javax.servlet.http.HttpServletResponse response,
                              java.lang.String batchId,
                              ConverterManager converterManager)
                       throws java.io.IOException

  Simple ctor

  Parameters:
    `response` - Used to flush output
    `batchId` - The id of the batch that we are responding to
    `converterManager` - How we convert objects to script
  Throws:
    `java.io.IOException` - If stream ops fail

Method Detail

### beginStream

    public void beginStream()

  Description copied from class: `BaseScriptConduit`
  Called when we are initially setting up the stream. This does not send any data to the client, just sets it up for data.

  This method is always called exactly once in the lifetime of a conduit, after `#preStreamSetup()` and before any scripts are sent.

### endStream

    public void endStream()

  Description copied from class: `BaseScriptConduit`
  Called when we are shutting the stream down.

  This method is always called exactly once in the lifetime of a conduit, just before the stream is closed.

### addScript

    public boolean addScript(ScriptBuffer scriptBuffer)
                      throws java.io.IOException,
                             MarshallException

  Description copied from class: `ScriptConduit`
  Add a script to the list bound for remote execution.

  It is not an error to refuse to handle the script and return false, it just indicates that this ScriptConduit did not accept the script. If the ScriptConduit can no longer function then it should throw an exception and it will be asumed to be no longer useful. If you want to implement this method then you will probably be doing something like calling `ServletOutputStream.print(String)` and passing in the results of calling ScriptBufferUtil.createOutput().

  Specified by:
    `addScript` in class `ScriptConduit`
  Parameters:
    `scriptBuffer` - The script to execute
  Returns:
    true if this ScriptConduit handled the script.
  Throws:
    `java.io.IOException` - If this conduit is broken and should not be used
    `MarshallException` - If objects in the script can not be marshalled

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