|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.rest.DefaultContentTypeHandlerManager
public class DefaultContentTypeHandlerManager
Manages ContentTypeHandler
instances and uses them to
process results
Field Summary |
---|
Fields inherited from interface org.apache.struts2.rest.ContentTypeHandlerManager |
---|
STRUTS_REST_HANDLER_OVERRIDE_PREFIX |
Constructor Summary | |
---|---|
DefaultContentTypeHandlerManager()
|
Method Summary | |
---|---|
protected java.lang.String |
findExtension(java.lang.String url)
Finds the extension in the url |
ContentTypeHandler |
getHandlerForRequest(javax.servlet.http.HttpServletRequest req)
Gets the handler for the request by looking at the request content type and extension |
ContentTypeHandler |
getHandlerForResponse(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Gets the handler for the response by looking at the extension of the request |
java.lang.String |
handleResult(com.opensymphony.xwork2.config.entities.ActionConfig actionConfig,
java.lang.Object methodResult,
java.lang.Object target)
Handles the result using handlers to generate content type-specific content |
void |
setContainer(com.opensymphony.xwork2.inject.Container container)
|
void |
setDefaultExtension(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultContentTypeHandlerManager()
Method Detail |
---|
public void setDefaultExtension(java.lang.String name)
public void setContainer(com.opensymphony.xwork2.inject.Container container)
public ContentTypeHandler getHandlerForRequest(javax.servlet.http.HttpServletRequest req)
getHandlerForRequest
in interface ContentTypeHandlerManager
req
- The request
public ContentTypeHandler getHandlerForResponse(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
getHandlerForResponse
in interface ContentTypeHandlerManager
req
- The request
public java.lang.String handleResult(com.opensymphony.xwork2.config.entities.ActionConfig actionConfig, java.lang.Object methodResult, java.lang.Object target) throws java.io.IOException
handleResult
in interface ContentTypeHandlerManager
actionConfig
- The action config for the current requestmethodResult
- The object returned from the action methodtarget
- The object to return, usually the action object
java.io.IOException
- If unable to write to the responseprotected java.lang.String findExtension(java.lang.String url)
url
- The url
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |