|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mortbay.util.ajax.JSON
com.dyuproject.json.StandardJSON
com.dyuproject.web.rest.JSONDispatcher
public final class JSONDispatcher
Generates a JSON response from the object on the request attribute identified by
JSON_DATA
.
Nested Class Summary | |
---|---|
static class |
JSONDispatcher.SimpleResponse
|
Nested classes/interfaces inherited from class org.mortbay.util.ajax.JSON |
---|
org.mortbay.util.ajax.JSON.Convertible, org.mortbay.util.ajax.JSON.Convertor, org.mortbay.util.ajax.JSON.Generator, org.mortbay.util.ajax.JSON.Literal, org.mortbay.util.ajax.JSON.Output, org.mortbay.util.ajax.JSON.ReaderSource, org.mortbay.util.ajax.JSON.Source, org.mortbay.util.ajax.JSON.StringSource |
Field Summary | |
---|---|
static org.mortbay.util.ajax.JSON.Generator |
EMPTY_RESPONSE_MAP
|
static String |
JSON_DATA
|
Fields inherited from class com.dyuproject.json.StandardJSON |
---|
_addClass, _convertorCache |
Constructor Summary | |
---|---|
JSONDispatcher()
|
Method Summary | |
---|---|
void |
destroy(WebContext webContext)
|
void |
dispatch(String errorMsg,
HttpServletRequest request,
HttpServletResponse response)
|
void |
init(WebContext webContext)
|
void |
write(Object data,
HttpServletRequest request,
HttpServletResponse response)
|
void |
writeSimpleResponse(String msg,
boolean error,
HttpServletRequest request,
HttpServletResponse response)
|
Methods inherited from class com.dyuproject.json.StandardJSON |
---|
getConvertor, getConvertorCache, getResource, getResource, isAddClass, isCheckParents, loadClass, loadClass, parseObject, setAddClass, setCheckParents |
Methods inherited from class org.mortbay.util.ajax.JSON |
---|
addConvertor, addConvertorFor, append, appendArray, appendArray, appendBoolean, appendJSON, appendJSON, appendJSON, appendMap, appendNull, appendNumber, appendString, complete, contextFor, contextForArray, convertTo, fromJSON, getConvertorFor, getDefault, getStringBufferSize, handleUnknown, newArray, newMap, parse, parse, parse, parse, parse, parse, parse, parse, parseArray, parseNumber, parseString, registerConvertor, seekTo, seekTo, setDefault, setStringBufferSize, toJSON, toString, toString, toString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JSON_DATA
public static final org.mortbay.util.ajax.JSON.Generator EMPTY_RESPONSE_MAP
Constructor Detail |
---|
public JSONDispatcher()
Method Detail |
---|
public void dispatch(String errorMsg, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
dispatch
in interface ViewDispatcher
ServletException
IOException
public void write(Object data, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
ServletException
IOException
public void writeSimpleResponse(String msg, boolean error, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
ServletException
IOException
public void destroy(WebContext webContext)
destroy
in interface LifeCycle
public void init(WebContext webContext)
init
in interface LifeCycle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |