Class SimpleTaskExecutor

  • All Implemented Interfaces:
    TaskExecutor

    public class SimpleTaskExecutor
    extends Object
    implements TaskExecutor
    A simple TaskExecutor that simply executes a task.
    • Constructor Detail

      • SimpleTaskExecutor

        @Inject
        public SimpleTaskExecutor​(@Named("tokenDataLayer")
                                  Debug debug,
                                  TokenStorageAdapter adapter)
    • Method Detail

      • start

        public void start()
                   throws DataLayerException
        Description copied from interface: TaskExecutor
        If the executor needs to do anything to start up it should be done here. Clients should call this method after obtaining a reference to the executor.
        Specified by:
        start in interface TaskExecutor
        Throws:
        DataLayerException
      • execute

        public void execute​(String tokenId,
                            Task task)
        The simple executor that executes a task. TokenId is unused in this implementation.
        Specified by:
        execute in interface TaskExecutor
        Parameters:
        tokenId - The token the task is in reference to. May be null in the case of query.
        task - The task to be executed.