|
Project Wonder 5.0.0.8793 | |||||||||
| 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(WOContext context)
Constructs a new JSONComponent. |
|
| Method Summary | ||
|---|---|---|
protected void |
_setContext(WOContext context)
Sets the current context. |
|
protected void |
checkAccess()
Called prior to issuing any calls to the component. |
|
|
componentWithName(Class<T> componentClass)
Returns a JSONComponent of the given type. |
|
static
|
componentWithName(Class<T> componentClass,
WOContext context)
Returns a JSONComponent of the given type. |
|
static
|
componentWithName(String componentClassName,
WOContext context)
Returns a JSONComponent of the given type. |
|
protected 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(WOContext context)
context - the context that created the component| Method Detail |
|---|
protected WOContext context()
protected void _setContext(WOContext context)
context - the current context.protected void checkAccess()
public <T extends JSONComponent> T componentWithName(Class<T> componentClass)
T - the JSONComponent typecomponentClass - the class to instantiate
public static <T extends JSONComponent> T componentWithName(Class<T> componentClass,
WOContext context)
T - the JSONComponent typecomponentClass - the class to instantiatecontext - the WOContext to create within
public static <T extends JSONComponent> T componentWithName(String componentClassName,
WOContext context)
T - the JSONComponent typecomponentClassName - the name of the class to instantiatecontext - the WOContext to create within
|
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 | |||||||||