Interface IUserActivityBlockingService
-
public interface IUserActivityBlockingService
The service to control user activity during long performing operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
endBlockingOperation(Object handle)
Ends the blocking operation described by the specifiedhandle
.boolean
isUserActivityBlocked()
Returnstrue
if there are blocking operations at the moment.void
registerProgressPresenter(IProgressPresenter presenter)
Registers the specifiedpresenter
for progress presentation of operations managed by this service.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.void
updateProgress(Object handle, int worked)
Updates the progress for the operation described by the specifiedhandle
.
-
-
-
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 benull
.message
- the localized message of the operation, cannot benull
.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 specifiedhandle
.- Parameters:
handle
- the handle of the operation, cannot benull
.
-
updateProgress
void updateProgress(Object handle, int worked)
Updates the progress for the operation described by the specifiedhandle
.- Parameters:
handle
- the handle, cannot benull
.worked
- the amount of done work since the operation starting or the last update, should be a positive integer.
-
isUserActivityBlocked
boolean isUserActivityBlocked()
Returnstrue
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 specifiedpresenter
for progress presentation of operations managed by this service.- Parameters:
presenter
- theIProgressPresenter
instance, cannot benull
.
-
-