Interface IUserActivityBlockingService


  • public interface IUserActivityBlockingService
    The service to control user activity during long performing operations.
    • Method Detail

      • startBlockingOperation

        Object startBlockingOperation​(String name,
                                      String message,
                                      int workCount,
                                      long progressPresentationDelay)
        Starts the blocking operation with the specified arguments and returns the handle of the started operation.
        Parameters:
        name - an arbitrary name of the operation, cannot be null.
        message - the localized message of the operation, cannot be null.
        workCount - the amount of work, should a be positive integer or -1 if unknown.
        progressPresentationDelay - the delay before progress presentation for user.
        Returns:
        the handle of the started operation, never null.
      • endBlockingOperation

        void endBlockingOperation​(Object handle)
        Ends the blocking operation described by the specified handle.
        Parameters:
        handle - the handle of the operation, cannot be null.
      • updateProgress

        void updateProgress​(Object handle,
                            int worked)
        Updates the progress for the operation described by the specified handle.
        Parameters:
        handle - the handle, cannot be null.
        worked - the amount of done work since the operation starting or the last update, should be a positive integer.
      • isUserActivityBlocked

        boolean isUserActivityBlocked()
        Returns true if there are blocking operations at the moment.
        Returns:
        true if there are blocking operations at the moment, false - otherwise.
      • registerProgressPresenter

        void registerProgressPresenter​(IProgressPresenter presenter)
        Registers the specified presenter for progress presentation of operations managed by this service.
        Parameters:
        presenter - the IProgressPresenter instance, cannot be null.