Errai 3.0.1-SNAPSHOT

org.jboss.errai.common.client.api.tasks
Interface HasAsyncTaskRef

All Superinterfaces:
Runnable

public interface HasAsyncTaskRef
extends Runnable

Errai schedulers that accept a Runnable and produce an AsyncTask will inject the AsyncTask instance into the runnable if it implements this interface.

See Also:
ClientTaskManager

Method Summary
 AsyncTask getAsyncTask()
          Returns the AsyncTask instance most recently set in setAsyncTask(AsyncTask), or null if setAsyncTask() has not been called yet.
 void setAsyncTask(AsyncTask task)
          Called by Errai scheduler services when they receive this Runnable and before its run() method is called.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

setAsyncTask

void setAsyncTask(AsyncTask task)
Called by Errai scheduler services when they receive this Runnable and before its run() method is called.

Parameters:
task - The companion AsyncTask instance that has been created for this runnable

getAsyncTask

AsyncTask getAsyncTask()
Returns the AsyncTask instance most recently set in setAsyncTask(AsyncTask), or null if setAsyncTask() has not been called yet.


Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.