public interface IArtifactProvider
extends org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Returns
true if this is a provider for the given artifact. |
org.eclipse.core.runtime.IStatus |
getArtifact(IArtifactSink sink,
org.eclipse.core.runtime.IProgressMonitor monitor)
Writes the requested artifact to the given
IArtifactSink . |
boolean contains(org.eclipse.equinox.p2.metadata.IArtifactKey key)
true
if this is a provider for the given artifact.key
- An artifact keytrue
if this instance can provide the artifact for the given keyorg.eclipse.core.runtime.IStatus getArtifact(IArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException
IArtifactSink
.
The implementation is free to pick the most suitable internal storage format to serve the request, e.g. it may extract the artifact from a pack200-compressed format. If an error is detected while streaming the artifact (e.g. an MD5 checksum error), the implementation may re-attempt the read from all other available sources. In case there were multiple read attempts, a multi-status with the results of all attempts is returned.
sink
- A sink for a specific artifact. When this method returns, the sink will either be
closed (with IArtifactSink.commitWrite()
or
IArtifactSink.abortWrite()
, depending on the status), or not have received
any content.monitor
- A progress monitor, or null
ArtifactSinkException
- if that exception is thrown by the given IArtifactSink
IArtifactSink.getArtifactToBeWritten()
Copyright © 2008–2022 Eclipse Foundation. All rights reserved.