org.directwebremoting.dwrp
Class BaseScriptConduit

java.lang.Object
  extended by org.directwebremoting.extend.ScriptConduit
      extended by org.directwebremoting.dwrp.BaseScriptConduit
All Implemented Interfaces:
java.lang.Comparable<ScriptConduit>
Direct Known Subclasses:
Html4kScriptConduit, HtmlScriptConduit, PlainScriptConduit

public abstract class BaseScriptConduit
extends ScriptConduit

A ScriptConduit that works with the parent Marshaller. In some ways this is nasty because it has access to essentially private parts of PollHandler, however there is nowhere sensible to store them within that class, so this is a hacky simplification.

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
BaseScriptConduit(javax.servlet.http.HttpServletResponse response, java.lang.String batchId, ConverterManager converterManager, boolean jsonOutput)
          Simple ctor
 
Method Summary
 void close(int timetoNextPoll)
          A poll has finished, get the client to call us back
 Alarm getErrorAlarm()
           
 void setDebugScriptOutput(boolean debugScriptOutput)
          Do we debug all the scripts that we output?
 
Methods inherited from class org.directwebremoting.extend.ScriptConduit
addScript, compareTo, equals, getRank, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseScriptConduit

public BaseScriptConduit(javax.servlet.http.HttpServletResponse response,
                         java.lang.String batchId,
                         ConverterManager converterManager,
                         boolean jsonOutput)
                  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 actions fail
Method Detail

close

public void close(int timetoNextPoll)
           throws java.io.IOException
A poll has finished, get the client to call us back

Parameters:
timetoNextPoll - How long before we tell the browser to come back?
Throws:
java.io.IOException - When we fail to call endStream()

setDebugScriptOutput

public void setDebugScriptOutput(boolean debugScriptOutput)
Do we debug all the scripts that we output?

Parameters:
debugScriptOutput - true to debug all of the output scripts (verbose)

getErrorAlarm

public Alarm getErrorAlarm()
Returns:
The Alarm that goes off if something is badly broken

Copyright ¬ 2005