1 // Copyright 2008 Google Inc. All Rights Reserved.
3 package com
.google
.appengine
.tools
.admin
;
6 * Received by an {@link com.google.appengine.tools.admin.UpdateListener}
7 * periodically during an operation to indicate progress.
10 public class UpdateProgressEvent
{
12 private String message
;
13 private int percentageComplete
;
14 private Thread updateThread
;
16 public UpdateProgressEvent(Thread updateThread
, String message
, int percentageComplete
) {
17 this.message
= message
;
18 this.percentageComplete
= percentageComplete
;
19 this.updateThread
= updateThread
;
23 * Cancels the operation. A
24 * {@link com.google.appengine.tools.admin.AppAdmin#rollback rollback} is
27 public void cancel() {
28 updateThread
.interrupt();
32 * Retrieves the current status message.
34 * @return a not {@code null} status message.
36 public String
getMessage() {
41 * Retrieves the current percentage complete.
43 * @return a number inclusively between 0 and 100.
45 public int getPercentageComplete() {
46 return percentageComplete
;