|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.directwebremoting.dwrp.BaseCallMarshaller
public abstract class BaseCallMarshaller
A Marshaller that output plain Javascript. This marshaller can be tweaked to output Javascript in an HTML context. This class works in concert with CallScriptConduit, they should be considered closely related and it is important to understand what one does while editing the other.
Nested Class Summary | |
---|---|
protected class |
BaseCallMarshaller.CallScriptConduit
A ScriptConduit that works with the parent Marshaller. |
Field Summary | |
---|---|
protected AccessControl |
accessControl
The security manager |
protected static java.lang.String |
ATTRIBUTE_BATCH
How we stash away the results of the request parse |
protected static java.lang.String |
ATTRIBUTE_CONDUIT
How we stash away the conduit |
protected static java.lang.String |
ATTRIBUTE_REQUEST
How we stash away the request |
protected ConverterManager |
converterManager
How we convert parameters |
protected CreatorManager |
creatorManager
How we create new beans |
protected boolean |
crossDomainSessionSecurity
To we perform cross-domain session security checks? |
protected static Logger |
log
The log stream |
protected PageNormalizer |
pageNormalizer
How we turn pages into the canonical form. |
protected java.lang.String |
sessionCookieName
The session cookie name |
Constructor Summary | |
---|---|
BaseCallMarshaller()
|
Method Summary | |
---|---|
protected abstract java.lang.String |
getOutboundMimeType()
What mime type should we send to the browser for this data? |
boolean |
isConvertable(java.lang.Class paramType)
Check if we can coerce the given type |
void |
marshallException(HttpServletRequest request,
HttpServletResponse response,
java.lang.Exception ex)
Try to find a batchId to send to the client so it knows what broke |
Calls |
marshallInbound(HttpServletRequest request,
HttpServletResponse response)
Marshall an incomming HttpRequest into an abstract Calls POJO that defines the functions that we need to call. |
void |
marshallOutbound(Replies replies,
HttpServletRequest request,
HttpServletResponse response)
Marshall the return values from executing this batch of requests. |
protected abstract void |
sendOutboundScriptPrefix(java.io.PrintWriter out,
java.lang.String batchId)
iframe mode starts as HTML, so get into script mode |
protected abstract void |
sendOutboundScriptSuffix(java.io.PrintWriter out,
java.lang.String batchId)
iframe mode needs to get out of script mode |
protected abstract void |
sendScript(java.io.PrintWriter out,
java.lang.String script)
Send a script to the browser |
void |
setAccessControl(AccessControl accessControl)
Accessor for the security manager |
void |
setAllowGetForSafariButMakeForgeryEasier(boolean allowGetForSafariButMakeForgeryEasier)
|
void |
setConverterManager(ConverterManager converterManager)
Accessor for the DefaultCreatorManager that we configure |
void |
setCreatorManager(CreatorManager creatorManager)
Accessor for the DefaultCreatorManager that we configure |
void |
setCrossDomainSessionSecurity(boolean crossDomainSessionSecurity)
To we perform cross-domain session security checks? |
void |
setPageNormalizer(PageNormalizer pageNormalizer)
Accessor for the PageNormalizer. |
void |
setSessionCookieName(java.lang.String sessionCookieName)
Alter the session cookie name from the default JSESSIONID. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String sessionCookieName
protected boolean crossDomainSessionSecurity
protected PageNormalizer pageNormalizer
protected ConverterManager converterManager
protected CreatorManager creatorManager
protected AccessControl accessControl
protected static final java.lang.String ATTRIBUTE_REQUEST
protected static final java.lang.String ATTRIBUTE_CONDUIT
protected static final java.lang.String ATTRIBUTE_BATCH
protected static final Logger log
Constructor Detail |
---|
public BaseCallMarshaller()
Method Detail |
---|
public Calls marshallInbound(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServerException
Marshaller
marshallInbound
in interface Marshaller
request
- The incoming Http requestresponse
- An Ajax response, XML, JSON, Javascript, etc.
java.io.IOException
- If the connection breaks
ServerException
- If an error occurs during parsingpublic void marshallOutbound(Replies replies, HttpServletRequest request, HttpServletResponse response) throws java.io.IOException
Marshaller
marshallOutbound
in interface Marshaller
replies
- The objects to convert into a replyrequest
- The incoming Http requestresponse
- An Ajax response, XML, JSON, Javascript, etc.
java.io.IOException
- If the connection breakspublic void marshallException(HttpServletRequest request, HttpServletResponse response, java.lang.Exception ex) throws java.io.IOException
Marshaller
marshallException
in interface Marshaller
request
- The incoming Http requestresponse
- An Ajax response, XML, JSON, Javascript, etc.ex
- The exception that we wish to propogate to the client
java.io.IOException
- If writing to the output stream failsprotected abstract void sendScript(java.io.PrintWriter out, java.lang.String script) throws java.io.IOException
out
- The stream to write toscript
- The script to send
java.io.IOException
- If the write failsprotected abstract java.lang.String getOutboundMimeType()
protected abstract void sendOutboundScriptPrefix(java.io.PrintWriter out, java.lang.String batchId) throws java.io.IOException
out
- The stream to write tobatchId
- The batch identifier so we can prepare the environment
java.io.IOException
- If the write failsprotected abstract void sendOutboundScriptSuffix(java.io.PrintWriter out, java.lang.String batchId) throws java.io.IOException
out
- The stream to write tobatchId
- The batch identifier so we can prepare the environment
java.io.IOException
- If the write failspublic boolean isConvertable(java.lang.Class paramType)
Marshaller
isConvertable
in interface Marshaller
paramType
- The type to check
paramType
is coercablepublic void setConverterManager(ConverterManager converterManager)
converterManager
- The new DefaultConverterManagerpublic void setCreatorManager(CreatorManager creatorManager)
creatorManager
- The new DefaultConverterManagerpublic void setAccessControl(AccessControl accessControl)
accessControl
- The accessControl to set.public void setPageNormalizer(PageNormalizer pageNormalizer)
pageNormalizer
- The new PageNormalizerpublic void setCrossDomainSessionSecurity(boolean crossDomainSessionSecurity)
crossDomainSessionSecurity
- the cross domain session security settingpublic void setAllowGetForSafariButMakeForgeryEasier(boolean allowGetForSafariButMakeForgeryEasier)
allowGetForSafariButMakeForgeryEasier
- Do we reduce security to help Safaripublic void setSessionCookieName(java.lang.String sessionCookieName)
sessionCookieName
- the sessionCookieName to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |