org.directwebremoting.dwrp
Class BaseCallMarshaller.CallScriptConduit

java.lang.Object
  extended by org.directwebremoting.extend.ScriptConduit
      extended by org.directwebremoting.dwrp.BaseCallMarshaller.CallScriptConduit
All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
BaseCallMarshaller

protected class BaseCallMarshaller.CallScriptConduit
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 BaseCallMarshaller, 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
protected BaseCallMarshaller.CallScriptConduit(java.io.PrintWriter out)
          Simple ctor
 
Method Summary
 boolean addScript(ScriptBuffer script)
          Add a script to the list bound for remote execution.
 
Methods inherited from class org.directwebremoting.extend.ScriptConduit
compareTo, equals, getRank, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseCallMarshaller.CallScriptConduit

protected BaseCallMarshaller.CallScriptConduit(java.io.PrintWriter out)
Simple ctor

Parameters:
out - The stream to write to
Method Detail

addScript

public boolean addScript(ScriptBuffer script)
                  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:
script - 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