|
Project Wonder 5.0.0.8793 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.webobjects.appserver.WORequestHandler
er.ajax.json.JSONRequestHandler
public class JSONRequestHandler
JSONRequestHandler provides support for JSON RPC services that can be both stateless or stateful (using JSON Components).
| Properties | |
er.ajax.json.globalBacktrackCacheSize | the maximum number of global components that can be in the session (defaults to backtrack cache size) |
er.ajax.json.backtrackCacheSize | the maximum number of non-global components that can be in the session (defaults to backtrack cache size) |
| Nested Class Summary | |
|---|---|
protected static class |
JSONRequestHandler.JSONComponentCallback
|
protected static class |
JSONRequestHandler.LRUMap<U,V>
|
| Field Summary | |
|---|---|
static String |
RequestHandlerKey
|
| Fields inherited from class com.webobjects.appserver.WORequestHandler |
|---|
DidHandleRequestNotification |
| Constructor Summary | |
|---|---|
JSONRequestHandler()
Creates a new JSONRequestHandler. |
|
| Method Summary | |
|---|---|
static String |
_jsonUrl(WOContext context,
String requestHandlerKey,
String componentNameAndInstance,
String queryString)
Returns a URL pointing to the JSON request handler. |
protected static String |
componentNameAndInstance(String componentName,
String componentInstance)
|
protected org.jabsorb.JSONRPCBridge |
createBridgeForComponent(JSONComponent component,
String componentName,
String componentInstance,
Map<String,org.jabsorb.JSONRPCBridge> componentBridges)
|
org.jabsorb.JSONRPCBridge |
getJSONBridge()
Returns the shared JSON Bridge for this request handler. |
WOResponse |
handleRequest(WORequest request)
|
static String |
jsonUrl(WOContext context,
String queryString)
Returns a URL pointing to the JSON request handler. |
static String |
jsonUrl(WOContext context,
String requestHandlerKey,
String queryString)
Returns a URL pointing to the JSON request handler. |
static String |
jsonUrl(WOContext context,
String componentName,
String instance,
String queryString)
Returns a URL pointing to the JSON request handler for a JSON component. |
static String |
jsonUrl(WOContext context,
String requestHandlerKey,
String componentName,
String componentInstance,
String queryString)
Returns a URL pointing to the JSON request handler. |
static JSONRequestHandler |
register()
Registers the JSONRequestHandler with your application using the default key. |
static void |
registerClass(Class clazz)
Registers all of the methods of the given class to be available for services to call (see JSONRPCBridge). |
static void |
registerClass(String name,
Class clazz)
Registers all of the methods of the given class to be available for services to call (see JSONRPCBridge). |
static void |
registerSerializer(org.jabsorb.serializer.Serializer serializer)
Registers a custom serializer into the global JSON serializers (see JSONRPCBridge). |
void |
registerService(String name,
Object serviceObject)
Registers the given object in the shared JSON bridge. |
| Methods inherited from class com.webobjects.appserver.WORequestHandler |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String RequestHandlerKey
| Constructor Detail |
|---|
public JSONRequestHandler()
| Method Detail |
|---|
public static JSONRequestHandler register()
public org.jabsorb.JSONRPCBridge getJSONBridge()
public static void registerSerializer(org.jabsorb.serializer.Serializer serializer)
throws Exception
serializer - the serializer to register
Exception - if the registration fails
public static void registerClass(Class clazz)
throws Exception
clazz - the class to register
Exception - if the registration fails
public static void registerClass(String name,
Class clazz)
throws Exception
name - the namespace to register the methods underclazz - the class to register
Exception - if the registration fails
public void registerService(String name,
Object serviceObject)
name - the name to register the object asserviceObject - the instance to register
public static String jsonUrl(WOContext context,
String queryString)
context - the current WOContextqueryString - the query string to append
public static String jsonUrl(WOContext context,
String requestHandlerKey,
String queryString)
context - the current WOContextrequestHandlerKey - if you registered a custom JSON request handler keyqueryString - the query string to append
public static String jsonUrl(WOContext context,
String componentName,
String instance,
String queryString)
context - the current WOContextcomponentName - the name of the component to lookupinstance - the instance identifier (any value) to create a unique instance (or null for a session-global)queryString - the query string to append
public static String jsonUrl(WOContext context,
String requestHandlerKey,
String componentName,
String componentInstance,
String queryString)
context - the current WOContextrequestHandlerKey - if you registered a custom JSON request handler keycomponentName - the name of the component to lookup (or null for the shared bridge)componentInstance - the instance identifier (any value) to create a unique instance (or null for a session-global)queryString - the query string to append
public static String _jsonUrl(WOContext context,
String requestHandlerKey,
String componentNameAndInstance,
String queryString)
context - the current WOContextrequestHandlerKey - if you registered a custom JSON request handler keycomponentNameAndInstance - the name/instance identifier of the component to lookup (or null for the shared bridge)queryString - the query string to append
public WOResponse handleRequest(WORequest request)
handleRequest in class WORequestHandler
protected static String componentNameAndInstance(String componentName,
String componentInstance)
protected org.jabsorb.JSONRPCBridge createBridgeForComponent(JSONComponent component,
String componentName,
String componentInstance,
Map<String,org.jabsorb.JSONRPCBridge> componentBridges)
throws Exception
Exception
|
Last updated: Thu, Jan 8, 2009 04:37 AM EST | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||