KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > viewers > model > provisional > IStatusMonitor


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.viewers.model.provisional;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14 import org.eclipse.core.runtime.IStatus;
15
16 /**
17  * A progress monitor that accepts a status. This common base interface is used
18  * to make non-blocking requests on models that may reply asynchronously. A request
19  * may be cancelled by the caller or by the client fulfilling the request (by
20  * calling <code>setCancelled(true)</code> on the request). Failure and error
21  * states are reported by setting a status on a monitor. When a request
22  * is complete, the client fulfilling the request must call <code>done()</code> on the
23  * monitor, whether the update succeeds, fails, or is cancelled.
24  * <p>
25  * Clients accepting a status monitor are expected to poll the
26  * monitor (using <code>isCanceled</code>) periodically and abort at their
27  * earliest convenience if a request is cancelled.
28  * </p>
29  * <p>
30  * This interface is not intended to be implemented by clients.
31  * </p>
32  * @since 3.3
33  * <p>
34  * <strong>EXPERIMENTAL</strong>. This interface has been added as
35  * part of a work in progress. There is no guarantee that this API will
36  * remain unchanged during the 3.3 release cycle. Please do not use this API
37  * without consulting with the Platform/Debug team.
38  * </p>
39  */

40 public interface IStatusMonitor extends IProgressMonitor {
41
42     /**
43      * Sets the status for a request, possibly <code>null</code>.
44      * When a request fails, the status indicates why the request failed.
45      * A <code>null</code> status is considered to be successful.
46      *
47      * @param status request status
48      */

49     public void setStatus(IStatus status);
50     
51     /**
52      * Returns the status of this request, or <code>null</code>.
53      *
54      * @return request status - <code>null</code> is equivalent
55      * to an OK status
56      */

57     public IStatus getStatus();
58 }
59
Popular Tags