public interface UpdateHandler
Modifier and Type | Method and Description |
---|---|
java.util.SortedSet<org.osgi.framework.Version> |
getAvailableVersions()
Return the sorted set of available update-versions as reported by the server.
|
DownloadHandle |
getDownloadHandle(org.osgi.framework.Version version,
boolean fixPackage)
Return the
DownloadHandle for an update. |
org.osgi.framework.Version |
getHighestAvailableVersion()
Returns the highest available update-version as reported by the server.
|
java.io.InputStream |
getInputStream(org.osgi.framework.Version version,
boolean fixPackage)
Returns the
InputStream for an update. |
org.osgi.framework.Version |
getInstalledVersion()
Return version of the current installed update for this agent.
|
java.lang.String |
getName() |
long |
getSize(org.osgi.framework.Version version,
boolean fixPackage)
Return the estimated size for an update as reported by the server.
|
void |
install(java.io.InputStream inputStream)
Install an update from an input stream.
|
java.lang.String getName()
java.util.SortedSet<org.osgi.framework.Version> getAvailableVersions() throws RetryAfterException, java.io.IOException
null
.RetryAfterException
- if the server indicates it is too busy, and this call should be retried on a later moment;java.io.IOException
- in case the connection to the server failed.DownloadHandle getDownloadHandle(org.osgi.framework.Version version, boolean fixPackage) throws RetryAfterException
DownloadHandle
for an update.version
- the version of the update to get a download handle for, cannot be null
;fixPackage
- true
if a download handler for a fix-package should be requested, false
otherwise.null
.RetryAfterException
- if the server indicates it is too busy, and this call should be retried on a later moment.org.osgi.framework.Version getHighestAvailableVersion() throws RetryAfterException, java.io.IOException
null
, can be Version.emptyVersion
in case no
version is available.RetryAfterException
- if the server indicates it is too busy, and this call should be retried on a later moment;java.io.IOException
- in case the connection to the server failed.java.io.InputStream getInputStream(org.osgi.framework.Version version, boolean fixPackage) throws RetryAfterException, java.io.IOException
InputStream
for an update.version
- the version of the update to get an input-stream for, cannot be null
;fixPackage
- true
if an input-stream for a fix-package should be requested, false
otherwise.null
.RetryAfterException
- if the server indicates it is too busy, and this call should be retried on a later moment;java.io.IOException
- in case the connection to the server failed.org.osgi.framework.Version getInstalledVersion()
Version.emptyVersion
if no packages have been installed, never
null
.long getSize(org.osgi.framework.Version version, boolean fixPackage) throws RetryAfterException, java.io.IOException
version
- the version of the update to get a size estimation for, cannot be null
;fixPackage
- true
if a size estimation for a fix-package should be requested, false
otherwise.-1
indicates the size is unknown.RetryAfterException
- if the server indicates it is too busy, and this call should be retried on a later moment;java.io.IOException
- in case the connection to the server failed.void install(java.io.InputStream inputStream) throws InstallationFailedException, java.io.IOException
inputStream
- the inputStream, can not be null
.InstallationFailedException
- in case the installation failed;java.io.IOException
- if reading from the given input stream fails.