org.apache.shindig.gadgets.preload
Class PipelinedDataPreloader

java.lang.Object
  extended by org.apache.shindig.gadgets.preload.PipelinedDataPreloader

public class PipelinedDataPreloader
extends Object

Processes a single batch of pipeline data into tasks.


Constructor Summary
PipelinedDataPreloader(RequestPipeline requestPipeline, ContainerConfig config)
           
 
Method Summary
 Collection<Callable<PreloadedData>> createPreloadTasks(GadgetContext context, PipelinedData.Batch batch)
          Create preload tasks from a batch of social and http preloads
protected  HttpResponse executeSocialRequest(HttpRequest request)
          Hook for executing a JSON RPC fetch for social data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipelinedDataPreloader

@Inject
public PipelinedDataPreloader(RequestPipeline requestPipeline,
                                     ContainerConfig config)
Method Detail

createPreloadTasks

public Collection<Callable<PreloadedData>> createPreloadTasks(GadgetContext context,
                                                              PipelinedData.Batch batch)
Create preload tasks from a batch of social and http preloads


executeSocialRequest

protected HttpResponse executeSocialRequest(HttpRequest request)
                                     throws GadgetException
Hook for executing a JSON RPC fetch for social data. Subclasses can override to provide special handling (e.g., directly invoking a local API)

Parameters:
request - the social request
Returns:
the response to the request
Throws:
GadgetException - if there are errors processing the gadget spec


Copyright © 2007-2012. All Rights Reserved.