-
- All Superinterfaces:
Serializable
public interface WorkContextProvider extends Serializable
This interface specifies the methods aWork
instance uses to associate aList
ofWorkContext
instances to be set when theWork
instance gets executed by aWorkManager
.A
Work
instance could optionally implement this interface to indicate to theWorkManager
, that theWorkContext
s provided by thisWork
instance through thegetWorkContexts
method must be used while setting the execution context of theWork
instance. If thegetWorkContexts
method returns an empty List or null, the WorkManager must treat it as if no additional execution contexts are associated with that Work instance.- Since:
- 1.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<WorkContext>
getWorkContexts()
Gets an list ofWorkContexts
that needs to be used by theWorkManager
to set up the execution context while executing aWork
instance.
-
-
-
Method Detail
-
getWorkContexts
List<WorkContext> getWorkContexts()
Gets an list ofWorkContexts
that needs to be used by theWorkManager
to set up the execution context while executing aWork
instance.- Returns:
- an
List
ofWorkContext
instances.
-
-