Class AbstractIOTask

    • Field Detail

      • canceled

        private boolean canceled
        indicates whether the task has been canceled
      • failed

        private boolean failed
        indicates whether the task has been failed
    • Constructor Detail

      • AbstractIOTask

        protected AbstractIOTask()
        Constructs a new AbstractIOTask.
    • Method Detail

      • isCanceled

        public boolean isCanceled()
        Replies true if the task has been canceled
        Returns:
        true if the task has been canceled
      • setCanceled

        protected void setCanceled​(boolean canceled)
        Set whether this task has been canceled
        Parameters:
        canceled - true, if the task has been canceled; false otherwise
      • isFailed

        public boolean isFailed()
        Replies true if the task has been failed
        Returns:
        true if the task has been failed
      • setFailed

        protected void setFailed​(boolean failed)
        Sets whether the task has been failed
        Parameters:
        failed - whether the task has been failed
      • getLastException

        public Exception getLastException()
        Replies the last exception caught
        Returns:
        the last exception caught; null, if no exception was caught
      • setLastException

        protected void setLastException​(Exception lastException)
        Sets the last exception caught
        Parameters:
        lastException - the last exception
      • isSuccessful

        public boolean isSuccessful()
        Replies true if this task was successful, i.e. if it wasn't canceled and didn't fail
        Returns:
        true if this task was successful
      • cancel

        public abstract void cancel()
        Cancel the task