|
Spring BlazeDS Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.support.ApplicationObjectSupport org.springframework.web.context.support.WebApplicationObjectSupport org.springframework.web.servlet.view.AbstractView org.springframework.flex.http.AmfView
public class AmfView
Spring-MVC View
that renders AMF content by serializing the model for the current request using
BlazeDS's AMF serialization/deserialization APIs.
By default, the entire contents of the model map (with the exception of framework-specific classes) will be
encoded as AMF. For cases where the contents of the map need to be filtered, users may specify a specific set of
model attributes to encode via the renderedAttributes
property.
Field Summary | |
---|---|
static String |
DEFAULT_CONTENT_TYPE
|
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Fields inherited from interface org.springframework.web.servlet.View |
---|
RESPONSE_STATUS_ATTRIBUTE |
Constructor Summary | |
---|---|
AmfView()
|
Method Summary | |
---|---|
protected Object |
filterModel(Map<String,Object> model)
Filters out undesired attributes from the given model. |
Set<String> |
getRenderedAttributes()
Returns the attributes in the model that should be rendered by this view. |
protected void |
prepareResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
renderMergedOutputModel(Map<String,Object> model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
setDisableCaching(boolean disableCaching)
Disables caching of the generated AMF response. |
void |
setRenderedAttributes(Set<String> renderedAttributes)
Sets the attributes in the model that should be rendered by this view. |
Methods inherited from class org.springframework.web.servlet.view.AbstractView |
---|
addStaticAttribute, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setRequestContextAttribute, toString, writeToResponse |
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
---|
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_CONTENT_TYPE
Constructor Detail |
---|
public AmfView()
Method Detail |
---|
public Set<String> getRenderedAttributes()
public void setRenderedAttributes(Set<String> renderedAttributes)
public void setDisableCaching(boolean disableCaching)
Default is true
, which will prevent the client from caching the generated AMF response.
protected void prepareResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
prepareResponse
in class AbstractView
protected void renderMergedOutputModel(Map<String,Object> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
renderMergedOutputModel
in class AbstractView
Exception
protected Object filterModel(Map<String,Object> model)
Map
, or a
single value object. If only a single attribute is present in the model map, that value will be returned instead
of the full map.
Default implementation removes BindingResult
instances and entries not included in the renderedAttributes
property.
model
- the model, as passed on to renderMergedOutputModel(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
Spring BlazeDS Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |