org.directwebremoting.dwrp
Class PlainCallMarshaller

java.lang.Object
  extended by org.directwebremoting.dwrp.BaseCallMarshaller
      extended by org.directwebremoting.dwrp.PlainCallMarshaller
All Implemented Interfaces:
Marshaller

public class PlainCallMarshaller
extends BaseCallMarshaller

A Marshaller that outputs plain Javascript.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.directwebremoting.dwrp.BaseCallMarshaller
BaseCallMarshaller.CallScriptConduit
 
Field Summary
 
Fields inherited from class org.directwebremoting.dwrp.BaseCallMarshaller
accessControl, ATTRIBUTE_BATCH, ATTRIBUTE_CONDUIT, ATTRIBUTE_REQUEST, converterManager, creatorManager, crossDomainSessionSecurity, log, pageNormalizer, sessionCookieName
 
Constructor Summary
PlainCallMarshaller()
           
 
Method Summary
protected  java.lang.String getOutboundMimeType()
          What mime type should we send to the browser for this data?
protected  void sendOutboundScriptPrefix(java.io.PrintWriter out, java.lang.String batchId)
          iframe mode starts as HTML, so get into script mode
protected  void sendOutboundScriptSuffix(java.io.PrintWriter out, java.lang.String batchId)
          iframe mode needs to get out of script mode
protected  void sendScript(java.io.PrintWriter out, java.lang.String script)
          Send a script to the browser
 void setAllowScriptTagRemoting(boolean allowScriptTagRemoting)
          Do we allow ScriptTag remoting?
 void setScriptTagProtection(java.lang.String scriptTagProtection)
          What is the string we use for script tag hack protection
 
Methods inherited from class org.directwebremoting.dwrp.BaseCallMarshaller
isConvertable, marshallException, marshallInbound, marshallOutbound, setAccessControl, setAllowGetForSafariButMakeForgeryEasier, setConverterManager, setCreatorManager, setCrossDomainSessionSecurity, setPageNormalizer, setSessionCookieName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainCallMarshaller

public PlainCallMarshaller()
Method Detail

getOutboundMimeType

protected java.lang.String getOutboundMimeType()
Description copied from class: BaseCallMarshaller
What mime type should we send to the browser for this data?

Specified by:
getOutboundMimeType in class BaseCallMarshaller
Returns:
A mime-type

sendOutboundScriptPrefix

protected void sendOutboundScriptPrefix(java.io.PrintWriter out,
                                        java.lang.String batchId)
                                 throws java.io.IOException
Description copied from class: BaseCallMarshaller
iframe mode starts as HTML, so get into script mode

Specified by:
sendOutboundScriptPrefix in class BaseCallMarshaller
Parameters:
out - The stream to write to
batchId - The batch identifier so we can prepare the environment
Throws:
java.io.IOException - If the write fails

sendOutboundScriptSuffix

protected void sendOutboundScriptSuffix(java.io.PrintWriter out,
                                        java.lang.String batchId)
                                 throws java.io.IOException
Description copied from class: BaseCallMarshaller
iframe mode needs to get out of script mode

Specified by:
sendOutboundScriptSuffix in class BaseCallMarshaller
Parameters:
out - The stream to write to
batchId - The batch identifier so we can prepare the environment
Throws:
java.io.IOException - If the write fails

sendScript

protected void sendScript(java.io.PrintWriter out,
                          java.lang.String script)
                   throws java.io.IOException
Description copied from class: BaseCallMarshaller
Send a script to the browser

Specified by:
sendScript in class BaseCallMarshaller
Parameters:
out - The stream to write to
script - The script to send
Throws:
java.io.IOException - If the write fails

setAllowScriptTagRemoting

public void setAllowScriptTagRemoting(boolean allowScriptTagRemoting)
Do we allow ScriptTag remoting?

Parameters:
allowScriptTagRemoting - The new value to set

setScriptTagProtection

public void setScriptTagProtection(java.lang.String scriptTagProtection)
What is the string we use for script tag hack protection

Parameters:
scriptTagProtection - the scriptTagProtection to set