org.apache.shindig.gadgets.servlet
Class JsonRpcHandler

java.lang.Object
  extended by org.apache.shindig.gadgets.servlet.JsonRpcHandler

public class JsonRpcHandler
extends Object

Processes JSON-RPC requests by retrieving all necessary meta data in parallel and coalescing into a single output JSON construct.


Nested Class Summary
protected  class JsonRpcHandler.Job
           
 
Field Summary
protected  ExecutorService executor
           
protected  IframeUriManager iframeUriManager
           
protected  Processor processor
           
 
Constructor Summary
JsonRpcHandler(ExecutorService executor, Processor processor, IframeUriManager iframeUriManager)
           
 
Method Summary
protected  JsonRpcHandler.Job createNewJob(GadgetContext context)
           
 org.json.JSONObject process(org.json.JSONObject request)
          Processes a JSON request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

executor

protected final ExecutorService executor

processor

protected final Processor processor

iframeUriManager

protected final IframeUriManager iframeUriManager
Constructor Detail

JsonRpcHandler

@Inject
public JsonRpcHandler(ExecutorService executor,
                             Processor processor,
                             IframeUriManager iframeUriManager)
Method Detail

process

public org.json.JSONObject process(org.json.JSONObject request)
                            throws RpcException,
                                   org.json.JSONException
Processes a JSON request.

Parameters:
request - Original JSON request
Returns:
The JSON response.
Throws:
RpcException
org.json.JSONException

createNewJob

protected JsonRpcHandler.Job createNewJob(GadgetContext context)


Copyright © 2007-2012. All Rights Reserved.