KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > resources > refresh > IRefreshResult


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 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 - Initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.resources.refresh;
12
13 import org.eclipse.core.resources.IResource;
14
15 /**
16  * An <code>IRefreshResult</code> is provided to an auto-refresh
17  * monitor. The result is used to submit resources to be refreshed, and
18  * for reporting failure of the monitor.
19  * <p>
20  * This interface is not intended to be implemented by clients.
21  * </p>
22  * @since 3.0
23  */

24 public interface IRefreshResult {
25     /**
26      * Notifies that the given monitor has encountered a failure from which it
27      * cannot recover while monitoring the given resource.
28      * <p>
29      * If the given resource is <code>null</code> it indicates that the
30      * monitor has failed completely, and the refresh manager will have to
31      * take over the monitoring responsibilities for all resources that the
32      * monitor was monitoring.
33      *
34      * @param monitor a monitor which has encountered a failure that it
35      * cannot recover from
36      * @param resource the resource that the monitor can no longer
37      * monitor, or <code>null</code> to indicate that the monitor can no
38      * longer monitor any of the resources it was monitoring
39      */

40     public void monitorFailed(IRefreshMonitor monitor, IResource resource);
41
42     /**
43      * Requests that the provided resource be refreshed. The refresh will
44      * occur in the background during the next scheduled refresh.
45      *
46      * @param resource the resource to refresh
47      */

48     public void refresh(IResource resource);
49 }
50
Popular Tags