blob: b3067c00cd56af4cd643a148b4d221f78a25cd34 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*******************************************************************************
* Copyright (c) 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.equinox.p2.core;
import java.net.URI;
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
/**
* A service that is used to create or obtain instances of an
* {@link IProvisioningAgent}.
* @since 1.1
*/
public interface IProvisioningAgentProvider {
/**
* Service name constant for the agent provider service.
*/
public static final String SERVICE_NAME = IProvisioningAgentProvider.class.getName();
/**
* Creates a provisioning agent who metadata is stored at the given location.
* If a <code>null</code> location is provided, the provisioning agent for the
* currently running system is returned, if available. If a <code>null</code>
* location is provided and the currently running system has not been provisioned
* by any known agent, <code>null</code> is returned.
*
* @param location The location where the agent metadata is stored
* @return A provisioning agent, or <code>null</code> if a <code>null</code>
* parameter is provided an there is no currently running agent.
* @throws ProvisionException If agent creation failed. Reasons include:
* <ul>
* <li>The location is not writeable.</li>
* </ul>
*/
public IProvisioningAgent createAgent(URI location) throws ProvisionException;
}
|