public interface IRawArtifactProvider extends IArtifactProvider
Over IArtifactProvider
, this interface adds methods for obtaining artifacts in raw
formats, e.g. compressed with the JAR-optimized pack200 format. (With the
IArtifactProvider interface, artifacts can only be obtained in the canonical format,
i.e. the format in which the artifact can be used directly without additional decompression.)
Modifier and Type | Method and Description |
---|---|
boolean |
contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
Returns
true if this a provider for an artifact in the given format |
org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor[] |
getArtifactDescriptors(org.eclipse.equinox.p2.metadata.IArtifactKey key)
Return the raw artifact formats in which the given artifact can be provided.
|
org.eclipse.core.runtime.IStatus |
getRawArtifact(IRawArtifactSink sink,
org.eclipse.core.runtime.IProgressMonitor monitor)
Writes the requested artifact in the specified raw format to the given
IRawArtifactSink . |
contains, getArtifact
org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor[] getArtifactDescriptors(org.eclipse.equinox.p2.metadata.IArtifactKey key)
key
- An artifact keyboolean contains(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
true
if this a provider for an artifact in the given formatdescriptor
- An artifact descriptortrue
if this instance can provide the artifact as raw artifact in the
described formatorg.eclipse.core.runtime.IStatus getRawArtifact(IRawArtifactSink sink, org.eclipse.core.runtime.IProgressMonitor monitor) throws ArtifactSinkException
IRawArtifactSink
.
If an error is detected while streaming the artifact (e.g. an MD5 checksum error) and there are other sources available (e.g. in a composite provider), the implementation may re-attempt the read from these other 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 in a specific format. 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()
,
IRawArtifactSink.getArtifactFormatToBeWritten()
Copyright © 2008–2013 Eclipse Foundation. All rights reserved.