Class RunnableOperation

    • Constructor Detail

      • RunnableOperation

        public RunnableOperation​(java.lang.Runnable runnable)
        Runnable constructor.
        Parameters:
        runnable - The runnable to be decorated by this operation.
        Throws:
        java.lang.NullPointerException - if the given runnable is null.
    • Method Detail

      • execute

        public void execute()
        Executes the operation.

        This method should not change its state by calling AbstractTask.setState(TaskState). If cancellation is needed (to prevent recurrence, for example), a CancelException should be thrown.

        This method delegates to the decorated runnabled Runnable.run() method.
        Specified by:
        execute in class AbstractOperation