Class TaskServiceImpl
- java.lang.Object
-
- org.wso2.carbon.ntask.core.service.impl.TaskServiceImpl
-
- All Implemented Interfaces:
TaskService
public class TaskServiceImpl extends Object implements TaskService
This class represents the TaskService implementation.- See Also:
TaskService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.wso2.carbon.ntask.core.service.TaskService
TaskService.TaskServerMode, TaskService.TaskServiceConfiguration
-
-
Constructor Summary
Constructors Constructor Description TaskServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<TaskManager>
getAllTenantTaskManagersForType(String taskType)
Returns all the tenant task managers for a specific task typeTaskService.TaskServerMode
getEffectiveTaskServerMode()
Set<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.TaskManagerFactory
getTaskManagerFactory()
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
-
isServerInit
public boolean isServerInit()
Description copied from interface:TaskService
Checks whether the task server is full initialized.- Specified by:
isServerInit
in interfaceTaskService
- Returns:
- true if initialized
-
getTaskManagerFactory
public TaskManagerFactory getTaskManagerFactory()
-
getRegisteredTaskTypes
public Set<String> getRegisteredTaskTypes()
Description copied from interface:TaskService
Retrieves all the registered task types.- Specified by:
getRegisteredTaskTypes
in interfaceTaskService
- Returns:
- The task types
-
getTaskManager
public TaskManager getTaskManager(String taskType) throws org.wso2.carbon.ntask.common.TaskException
Description copied from interface:TaskService
Returns a task manager for the current tenant's task type.- Specified by:
getTaskManager
in interfaceTaskService
- 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
public List<TaskManager> getAllTenantTaskManagersForType(String taskType) throws org.wso2.carbon.ntask.common.TaskException
Description copied from interface:TaskService
Returns all the tenant task managers for a specific task type- Specified by:
getAllTenantTaskManagersForType
in interfaceTaskService
- Parameters:
taskType
- The task type- Returns:
- The list of task managers
- Throws:
org.wso2.carbon.ntask.common.TaskException
-
registerTaskType
public void registerTaskType(String taskType) throws org.wso2.carbon.ntask.common.TaskException
Description copied from interface:TaskService
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.- Specified by:
registerTaskType
in interfaceTaskService
- Parameters:
taskType
- The task type- Throws:
org.wso2.carbon.ntask.common.TaskException
-
serverInitialized
public void serverInitialized()
Description copied from interface:TaskService
Notifies the task service implementation that the server is fully initialized.- Specified by:
serverInitialized
in interfaceTaskService
-
getServerConfiguration
public TaskService.TaskServiceConfiguration getServerConfiguration()
Description copied from interface:TaskService
Returns the current task server configuration.- Specified by:
getServerConfiguration
in interfaceTaskService
- Returns:
- The task server configuration
-
getEffectiveTaskServerMode
public TaskService.TaskServerMode getEffectiveTaskServerMode()
-
runAfterRegistrationActions
public void runAfterRegistrationActions() throws org.wso2.carbon.ntask.common.TaskException
Description copied from interface:TaskService
This is called after the current task service is registered.- Specified by:
runAfterRegistrationActions
in interfaceTaskService
- Throws:
org.wso2.carbon.ntask.common.TaskException
-
-