|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecter.ajax.json.JSONComponent
public class JSONComponent
The base class for JSON "Components". JSONComponents provide a framework for implementing stateful JSON services. If you are providing a JSON service that is only used on a page, you can use AjaxProxy to provide a stateful JSON interface to a page. However, if you would like to provide stateful services to non-page-based clients, AjaxProxy isn't sufficient. By extending JSONComponent, all of your public methods are exposed as RPC calls to your clients that can be accessed by constructing a URL to a JSON Request Handler. For instance, /json/MyComponentName will give you a stateful service endpoint
If a method returns another JSONComponent, the client will be sent a JSONRedirect that contains the URL to communicate with the instance you returned.
THIS API IS STILL EXPERIMENTAL AND SUBJECT TO CHANGE
Constructor Summary | |
---|---|
JSONComponent(com.webobjects.appserver.WOContext context)
Constructs a new JSONComponent. |
Method Summary | ||
---|---|---|
protected void |
_setContext(com.webobjects.appserver.WOContext context)
Sets the current context. |
|
protected void |
checkAccess()
Called prior to issuing any calls to the component. |
|
|
componentWithName(java.lang.Class<T> componentClass)
Returns a JSONComponent of the given type. |
|
static
|
componentWithName(java.lang.Class<T> componentClass,
com.webobjects.appserver.WOContext context)
Returns a JSONComponent of the given type. |
|
static
|
componentWithName(java.lang.String componentClassName,
com.webobjects.appserver.WOContext context)
Returns a JSONComponent of the given type. |
|
protected com.webobjects.appserver.WOContext |
context()
Returns the current context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JSONComponent(com.webobjects.appserver.WOContext context)
context
- the context that created the componentMethod Detail |
---|
protected com.webobjects.appserver.WOContext context()
protected void _setContext(com.webobjects.appserver.WOContext context)
context
- the current context.protected void checkAccess()
public <T extends JSONComponent> T componentWithName(java.lang.Class<T> componentClass)
T
- the JSONComponent typecomponentClass
- the class to instantiate
public static <T extends JSONComponent> T componentWithName(java.lang.Class<T> componentClass, com.webobjects.appserver.WOContext context)
T
- the JSONComponent typecomponentClass
- the class to instantiatecontext
- the WOContext to create within
public static <T extends JSONComponent> T componentWithName(java.lang.String componentClassName, com.webobjects.appserver.WOContext context)
T
- the JSONComponent typecomponentClassName
- the name of the class to instantiatecontext
- the WOContext to create within
|
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 |