|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.dwrp.BaseScriptConduit
org.directwebremoting.dwrp.PlainScriptConduit
public class PlainScriptConduit
A ScriptConduit for use with plain Javascript output.
Scripts are plain Javascript without 'execute-in-parent-context' wrapping, but with script-start and script-end markers.
If this conduit is used the client should direct the output to an iframe and then poll, looking for new data into the iframe. The html tags should be removed and script between script-start and script-end tags eval()ed.
This conduit is useful for Firefox. It will not work as it stands with IE 6/7 because they don't allow the browser to see data entering an iframe until it overflows a 4k buffer.
| Constructor Summary | |
|---|---|
PlainScriptConduit(java.lang.String instanceId,
java.lang.String batchId,
ConverterManager converterManager,
boolean jsonOutput)
Simple ctor |
|
| Method Summary | |
|---|---|
java.lang.String |
getOutboundMimeType()
What mime type should we send to the browser for this data? |
void |
sendBeginChunk(java.io.PrintWriter out)
Called before a each set of scripts that are to be sent. |
void |
sendBeginStream(java.io.PrintWriter out)
Called when we are initially setting up the stream. |
void |
sendEndChunk(java.io.PrintWriter out)
Called after each set of scripts when they have been sent. |
void |
sendEndStream(java.io.PrintWriter out,
int timetoNextPoll)
Called when we are shutting the stream down. |
void |
sendScript(java.io.PrintWriter out,
java.lang.String script)
Add a script to the list bound for remote execution. |
| Methods inherited from class org.directwebremoting.dwrp.BaseScriptConduit |
|---|
setAccessLogLevel, setDebugScriptOutput |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlainScriptConduit(java.lang.String instanceId,
java.lang.String batchId,
ConverterManager converterManager,
boolean jsonOutput)
throws java.io.IOException
batchId - The id of the batch that we are responding toconverterManager - How we convert objects to script
java.io.IOException - If stream actions fail| Method Detail |
|---|
public java.lang.String getOutboundMimeType()
ScriptConduit
public void sendBeginStream(java.io.PrintWriter out)
ScriptConduitThis method is always called exactly once in the lifetime of a conduit.
public void sendBeginChunk(java.io.PrintWriter out)
ScriptConduit
public void sendScript(java.io.PrintWriter out,
java.lang.String script)
throws java.io.IOException,
ConversionException
ScriptConduitIt 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().
script - The script to execute
java.io.IOException - If this conduit is broken and should not be used
ConversionExceptionpublic void sendEndChunk(java.io.PrintWriter out)
ScriptConduit
public void sendEndStream(java.io.PrintWriter out,
int timetoNextPoll)
throws java.io.IOException
ScriptConduit
timetoNextPoll - How long before we tell the browser to come back?
java.io.IOException
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||