Package io.bdeploy.common
Interface ActivityReporter
- All Known Implementing Classes:
ActivityReporter.Delegating,ActivityReporter.Null,ActivityReporter.Stream,JerseyBroadcastingActivityReporter
public interface ActivityReporter
Allows reporting and tracking of activities.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn Activity allows updating progress and signaling when theActivityReporter.Activityis finished.static classException to be thrown when an activity has been cancelled from outside.static classDelegatorActivityReporterwhich can change destination lazily once a proper instance is available (after server startup, ...).static classNo-opActivityReporter, which does nothing, except beingnull.static final classAnActivityReporterimplementation which reports progress to a givenPrintStream. -
Method Summary
Modifier and TypeMethodDescriptionproxyActivities(RemoteService service) Proxy remote activities to thisActivityReporterimplementation if possible.Start anActivityReporter.Activitywithout any associated work amount.Start anActivityReporter.Activitywith a static work amount.start(String activity, LongSupplier maxValue, LongSupplier currentValue) Start anActivityReporter.Activitywith a dynamic maximum and current work amount.
-
Method Details
-
start
Start anActivityReporter.Activitywithout any associated work amount. -
start
Start anActivityReporter.Activitywith a static work amount. UseActivityReporter.Activity.worked(long)to updated the already consumed work amount.Special maxWork values:
- -1: don't report work at all. only time will be reported
- 0: don't report any maximum, just report current amount if possible.
-
start
Start anActivityReporter.Activitywith a dynamic maximum and current work amount. TheSuppliers are queried periodically when reporting progress, to catch updates on the values. -
proxyActivities
Proxy remote activities to thisActivityReporterimplementation if possible.
-