|
Project Wonder 5.0 | |||||||||||
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 java.lang.String |
RequestHandlerKey
|
Fields inherited from class com.webobjects.appserver.WORequestHandler |
---|
DidHandleRequestNotification |
Constructor Summary | |
---|---|
JSONRequestHandler()
Creates a new JSONRequestHandler. |
Method Summary | |
---|---|
static java.lang.String |
_jsonUrl(com.webobjects.appserver.WOContext context,
java.lang.String requestHandlerKey,
java.lang.String componentNameAndInstance,
java.lang.String queryString)
Returns a URL pointing to the JSON request handler. |
protected static java.lang.String |
componentNameAndInstance(java.lang.String componentName,
java.lang.String componentInstance)
|
protected org.jabsorb.JSONRPCBridge |
createBridgeForComponent(JSONComponent component,
java.lang.String componentName,
java.lang.String componentInstance,
java.util.Map<java.lang.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 java.lang.String |
jsonUrl(com.webobjects.appserver.WOContext context,
java.lang.String queryString)
Returns a URL pointing to the JSON request handler. |
static java.lang.String |
jsonUrl(com.webobjects.appserver.WOContext context,
java.lang.String requestHandlerKey,
java.lang.String queryString)
Returns a URL pointing to the JSON request handler. |
static java.lang.String |
jsonUrl(com.webobjects.appserver.WOContext context,
java.lang.String componentName,
java.lang.String instance,
java.lang.String queryString)
Returns a URL pointing to the JSON request handler for a JSON component. |
static java.lang.String |
jsonUrl(com.webobjects.appserver.WOContext context,
java.lang.String requestHandlerKey,
java.lang.String componentName,
java.lang.String componentInstance,
java.lang.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(java.lang.Class clazz)
Registers all of the methods of the given class to be available for services to call (see JSONRPCBridge). |
static void |
registerClass(java.lang.String name,
java.lang.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(java.lang.String name,
java.lang.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 java.lang.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 java.lang.Exception
serializer
- the serializer to register
java.lang.Exception
- if the registration failspublic static void registerClass(java.lang.Class clazz) throws java.lang.Exception
clazz
- the class to register
java.lang.Exception
- if the registration failspublic static void registerClass(java.lang.String name, java.lang.Class clazz) throws java.lang.Exception
name
- the namespace to register the methods underclazz
- the class to register
java.lang.Exception
- if the registration failspublic void registerService(java.lang.String name, java.lang.Object serviceObject)
name
- the name to register the object asserviceObject
- the instance to registerpublic static java.lang.String jsonUrl(com.webobjects.appserver.WOContext context, java.lang.String queryString)
context
- the current WOContextqueryString
- the query string to append
public static java.lang.String jsonUrl(com.webobjects.appserver.WOContext context, java.lang.String requestHandlerKey, java.lang.String queryString)
context
- the current WOContextrequestHandlerKey
- if you registered a custom JSON request handler keyqueryString
- the query string to append
public static java.lang.String jsonUrl(com.webobjects.appserver.WOContext context, java.lang.String componentName, java.lang.String instance, java.lang.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 java.lang.String jsonUrl(com.webobjects.appserver.WOContext context, java.lang.String requestHandlerKey, java.lang.String componentName, java.lang.String componentInstance, java.lang.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 java.lang.String _jsonUrl(com.webobjects.appserver.WOContext context, java.lang.String requestHandlerKey, java.lang.String componentNameAndInstance, java.lang.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 com.webobjects.appserver.WOResponse handleRequest(com.webobjects.appserver.WORequest request)
handleRequest
in class com.webobjects.appserver.WORequestHandler
protected static java.lang.String componentNameAndInstance(java.lang.String componentName, java.lang.String componentInstance)
protected org.jabsorb.JSONRPCBridge createBridgeForComponent(JSONComponent component, java.lang.String componentName, java.lang.String componentInstance, java.util.Map<java.lang.String,org.jabsorb.JSONRPCBridge> componentBridges) throws java.lang.Exception
java.lang.Exception
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |