KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > core > ISiteFactoryExtension


1 /*******************************************************************************
2  * Copyright (c) 2000, 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 Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.core;
12
13 import java.net.*;
14
15 import org.eclipse.core.runtime.*;
16 import org.eclipse.update.core.model.*;
17
18 /**
19  * <p>
20  * This is an extension to the standard ISiteFactory interface.
21  * If a factory implements this interface and is handling
22  * URL connections, a progress monitor can be passed to
23  * allow canceling of frozen connections.
24  * </p>
25  * <p>Input stream is obtained from the connection on
26  * a separate thread. When connection is canceled,
27  * the thread is still active. It is allowed to terminate
28  * when the connection times out on its own.
29  * </p>
30  * <p>
31  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
32  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
33  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
34  * (repeatedly) as the API evolves.
35  * </p>
36  * @see org.eclipse.update.core.BaseSiteFactory
37  * @since 2.1
38  */

39
40 public interface ISiteFactoryExtension {
41     /**
42      * Returns a site defined by the supplied URL.
43      * <p>
44      * The actual interpretation of the URL is site-type specific.
45      * In most cases the URL will point to some site-specific
46      * file that can be used (directly or indirectly) to construct
47      * the site object.
48      * </p>
49      * @param url URL interpreted by the site
50      * @param monitor a progress monitor that can be canceled
51      * @return site object
52      * @exception CoreException
53      * @exception InvalidSiteTypeException the referenced site type is
54      * not a supported type for this factory
55      * @since 2.0
56      */

57     public ISite createSite(URL url, IProgressMonitor monitor)
58         throws CoreException, InvalidSiteTypeException;
59 }
60
Popular Tags