Package jakarta.resource.spi.work
Interface WorkContextProvider
-
- All Superinterfaces:
Serializable
public interface WorkContextProvider extends Serializable
This interface specifies the methods aWorkinstance uses to associate aListofWorkContextinstances to be set when theWorkinstance gets executed by aWorkManager.A
Workinstance could optionally implement this interface to indicate to theWorkManager, that theWorkContexts provided by thisWorkinstance through thegetWorkContextsmethod must be used while setting the execution context of theWorkinstance. If thegetWorkContextsmethod 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 ofWorkContextsthat needs to be used by theWorkManagerto set up the execution context while executing aWorkinstance.
-
-
-
Method Detail
-
getWorkContexts
List<WorkContext> getWorkContexts()
Gets an list ofWorkContextsthat needs to be used by theWorkManagerto set up the execution context while executing aWorkinstance.- Returns:
- an
ListofWorkContextinstances.
-
-