Package org.wso2.carbon.ntask.core
Interface TaskLocationResolver
-
- All Known Implementing Classes:
RandomTaskLocationResolver
,RoundRobinTaskLocationResolver
,RuleBasedLocationResolver
public interface TaskLocationResolver
This interface represents the contract that must be implemented to retrieve the location that a given task should be scheduled.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getLocation(TaskServiceContext ctx, TaskInfo taskInfo)
Returns the location the given task should be scheduled in.void
init(Map<String,String> properties)
Initializes the task location resolver with the given properties.
-
-
-
Method Detail
-
init
void init(Map<String,String> properties) throws org.wso2.carbon.ntask.common.TaskException
Initializes the task location resolver with the given properties.- Parameters:
properties
- The property map- Throws:
org.wso2.carbon.ntask.common.TaskException
-
getLocation
int getLocation(TaskServiceContext ctx, TaskInfo taskInfo) throws org.wso2.carbon.ntask.common.TaskException
Returns the location the given task should be scheduled in.- Parameters:
ctx
- The task context, which contains environmental information on other tasks etc..taskInfo
- The task information of the task to be scheduled- Returns:
- The location of the task to be scheduled
- Throws:
org.wso2.carbon.ntask.common.TaskException
-
-