org.directwebremoting.bayeux
Class BayeuxScriptConduit

java.lang.Object
  extended by org.directwebremoting.extend.ScriptConduit
      extended by org.directwebremoting.bayeux.BayeuxScriptConduit
All Implemented Interfaces:
java.lang.Comparable<ScriptConduit>

public class BayeuxScriptConduit
extends ScriptConduit

Author:
Greg Wilkins [gregw at webtide dot com], 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
BayeuxScriptConduit(ConverterManager converterManager, boolean jsonOutput)
           
 
Method Summary
 boolean addScript(ScriptBuffer script)
          Add a script to the list bound for remote execution.
 java.lang.String toString()
           
 
Methods inherited from class org.directwebremoting.extend.ScriptConduit
compareTo, equals, getRank, hashCode, isHoldingConnectionToBrowser
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BayeuxScriptConduit

public BayeuxScriptConduit(ConverterManager converterManager,
                           boolean jsonOutput)
Method Detail

addScript

public boolean addScript(ScriptBuffer script)
                  throws java.io.IOException,
                         ConversionException
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 assumed 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
ConversionException - If objects in the script can not be marshalled

toString

public java.lang.String toString()
Overrides:
toString in class ScriptConduit

Copyright 2008