Interface TaskService
-
- All Known Implementing Classes:
TaskServiceImpl
public interface TaskService
This interface represents the task OSGi service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TaskService.TaskServerMode
static interface
TaskService.TaskServiceConfiguration
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<TaskManager>
getAllTenantTaskManagersForType(String taskType)
Returns all the tenant task managers for a specific task typeSet<String>
getRegisteredTaskTypes()
Retrieves all the registered task types.TaskService.TaskServiceConfiguration
getServerConfiguration()
Returns the current task server configuration.TaskManager
getTaskManager(String taskType)
Returns a task manager for the current tenant's task type.boolean
isServerInit()
Checks whether the task server is full initialized.void
registerTaskType(String taskType)
This method registers a task type in the server, this must be done for the task managers for the current tenant to be started up immediately.void
runAfterRegistrationActions()
This is called after the current task service is registered.void
serverInitialized()
Notifies the task service implementation that the server is fully initialized.
-
-
-
Method Detail
-
getTaskManager
TaskManager getTaskManager(String taskType) throws org.wso2.carbon.ntask.common.TaskException
Returns a task manager for the current tenant's task type.- Parameters:
taskType
- The type of the tasks, e.g. DSS, ESB, MS- Returns:
- The created / looked-up task manager
- Throws:
org.wso2.carbon.ntask.common.TaskException
-
getAllTenantTaskManagersForType
List<TaskManager> getAllTenantTaskManagersForType(String taskType) throws org.wso2.carbon.ntask.common.TaskException
Returns all the tenant task managers for a specific task type- Parameters:
taskType
- The task type- Returns:
- The list of task managers
- Throws:
org.wso2.carbon.ntask.common.TaskException
-
registerTaskType
void registerTaskType(String taskType) throws org.wso2.carbon.ntask.common.TaskException
This method registers a task type in the server, this must be done for the task managers for the current tenant to be started up immediately.- Parameters:
taskType
- The task type- Throws:
org.wso2.carbon.ntask.common.TaskException
-
getRegisteredTaskTypes
Set<String> getRegisteredTaskTypes()
Retrieves all the registered task types.- Returns:
- The task types
-
serverInitialized
void serverInitialized()
Notifies the task service implementation that the server is fully initialized.
-
isServerInit
boolean isServerInit()
Checks whether the task server is full initialized.- Returns:
- true if initialized
-
getServerConfiguration
TaskService.TaskServiceConfiguration getServerConfiguration()
Returns the current task server configuration.- Returns:
- The task server configuration
-
runAfterRegistrationActions
void runAfterRegistrationActions() throws org.wso2.carbon.ntask.common.TaskException
This is called after the current task service is registered.- Throws:
org.wso2.carbon.ntask.common.TaskException
-
-