Hi,

At the end of run method of a DeferredTask, I have to notify an object to 
extract the result of run() method. How do I do that ?

// Not Serializable
public class DeferredTaskTrigger
{
  protected int resultAggregate_ = 0 ;

  protected void addToQueue()
  {  
    Queue queue = QueueFactory.getDefaultQueue() ;
    DeferredTaskTrial1 deferredTaskTrial1 = new DeferredTaskTrial1() ;
    TaskOptions taskOptions = 
TaskOptions.Builder.withPayload(deferredTaskTrial1) ;   
    TaskHandle taskHandle = queue.add(taskOptions) ;      
  }
  // This object calls addToQueue() hundreds of times and accumulates the 
results of  DeferredTaskTrial1 objects in resultAggregate_ .
}

public class DeferredTaskTrial1 implements DeferredTask
{
  protected int result_ = 0 ;
  
  public void run()
  {
    // processing code here.
    // .....

    // capture the result of processing.
    result_  = 1 ;
    
   //  how to get the reference of DeferredTaskTrigger here ? ( Apparently, 
no way.)
   //  how else I can notify the DeferredTaskTrigger object to extract the 
result_  ?
  }

}

Thanks
J.Ganesan

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to