Interface ServerTask<V>

  • All Superinterfaces:
    java.util.concurrent.Callable<V>, Task

    public interface ServerTask<V>
    extends java.util.concurrent.Callable<V>, Task
    An interface for deployed server tasks. In order to deploy a custom ServerTask, deploy a module containing a service that implements this interface. The task will be accessible by the name returned by Task.getName() Before the execution, TaskContext is injected into the task to provide EmbeddedCacheManager, Cache, Marshaller and parameters.
    Michal Szynkiewicz <>
    • Method Detail

      • setTaskContext

        void setTaskContext​(TaskContext taskContext)
        Sets the task context Store the value in your task implementation to be able to access caches and other resources in the task
        taskContext - task execution context
      • getType

        default java.lang.String getType()
        Description copied from interface: Task
        Returns the type of task. This is dependent on the specific implementation.
        Specified by:
        getType in interface Task