public class JSONRequestHandler
extends com.webobjects.appserver.WORequestHandler
Name | Description |
---|---|
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) |
Modifier and Type | Class and Description |
---|---|
protected static class |
JSONRequestHandler.JSONComponentCallback |
protected static class |
JSONRequestHandler.LRUMap<U,V> |
Modifier and Type | Field and Description |
---|---|
static String |
RequestHandlerKey |
Constructor and Description |
---|
JSONRequestHandler()
Creates a new JSONRequestHandler.
|
Modifier and Type | Method and Description |
---|---|
static String |
_jsonUrl(com.webobjects.appserver.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.
|
com.webobjects.appserver.WOResponse |
handleRequest(com.webobjects.appserver.WORequest request) |
static String |
jsonUrl(com.webobjects.appserver.WOContext context,
String queryString)
Returns a URL pointing to the JSON request handler.
|
static String |
jsonUrl(com.webobjects.appserver.WOContext context,
String requestHandlerKey,
String queryString)
Returns a URL pointing to the JSON request handler.
|
static String |
jsonUrl(com.webobjects.appserver.WOContext context,
String componentName,
String instance,
String queryString)
Returns a URL pointing to the JSON request handler for a JSON component.
|
static String |
jsonUrl(com.webobjects.appserver.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.
|
public static final String RequestHandlerKey
public static JSONRequestHandler register()
public org.jabsorb.JSONRPCBridge getJSONBridge()
public static void registerSerializer(org.jabsorb.serializer.Serializer serializer) throws Exception
serializer
- the serializer to registerException
- if the registration failspublic static void registerClass(Class clazz) throws Exception
clazz
- the class to registerException
- if the registration failspublic static void registerClass(String name, Class clazz) throws Exception
name
- the namespace to register the methods underclazz
- the class to registerException
- if the registration failspublic void registerService(String name, Object serviceObject)
name
- the name to register the object asserviceObject
- the instance to registerpublic static String jsonUrl(com.webobjects.appserver.WOContext context, String queryString)
context
- the current WOContextqueryString
- the query string to appendpublic static String jsonUrl(com.webobjects.appserver.WOContext context, String requestHandlerKey, String queryString)
context
- the current WOContextrequestHandlerKey
- if you registered a custom JSON request handler keyqueryString
- the query string to appendpublic static String jsonUrl(com.webobjects.appserver.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 appendpublic static String jsonUrl(com.webobjects.appserver.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 appendpublic static String _jsonUrl(com.webobjects.appserver.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 appendpublic com.webobjects.appserver.WOResponse handleRequest(com.webobjects.appserver.WORequest request)
handleRequest
in class com.webobjects.appserver.WORequestHandler
protected static String componentNameAndInstance(String componentName, String componentInstance)
Copyright © 2002 – 2020 Project Wonder.