|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.repository.remote.RemoteSdk
public class RemoteSdk
This class keeps information on the remote SDK repository.
| Field Summary | |
|---|---|
static long |
DEFAULT_EXPIRATION_PERIOD_MS
Default expiration delay is 24 hours. |
| Constructor Summary | |
|---|---|
RemoteSdk(com.android.sdklib.internal.repository.updater.SettingsController settingsController)
|
|
| Method Summary | |
|---|---|
com.google.common.collect.Multimap<PkgType,RemotePkgInfo> |
fetch(com.android.sdklib.internal.repository.sources.SdkSources sources,
com.android.utils.ILogger logger)
Fetches the remote list of packages. |
com.android.sdklib.internal.repository.sources.SdkSources |
fetchSources(long expirationDelayMs,
com.android.utils.ILogger logger)
Returns the SdkSources object listing all sources to load from. |
protected com.android.sdklib.internal.repository.DownloadCache |
getDownloadCache()
Returns the DownloadCache
Extracted so that we can override this in unit tests. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_EXPIRATION_PERIOD_MS
| Constructor Detail |
|---|
public RemoteSdk(com.android.sdklib.internal.repository.updater.SettingsController settingsController)
| Method Detail |
|---|
@NonNull
public com.google.common.collect.Multimap<PkgType,RemotePkgInfo> fetch(@NonNull
com.android.sdklib.internal.repository.sources.SdkSources sources,
@NonNull
com.android.utils.ILogger logger)
SettingsController which
dictates whether the DownloadCache is used and whether HTTP
is enforced over HTTPS.
The call may block on network access. Callers will likely want to invoke this
from a thread and make sure the logger is thread-safe with regard to UI updates.
sources - The sources to download from.logger - A logger to report status & progress.
PkgType to RemotePkgInfo
describing the remote packages available for install/download.
@NonNull
public com.android.sdklib.internal.repository.sources.SdkSources fetchSources(long expirationDelayMs,
@NonNull
com.android.utils.ILogger logger)
SdkSources object listing all sources to load from.
This includes the main repository.xml, the main addon.xml as well as all the
add-ons or sys-img xmls listed in the addons-list.xml.
The method caches the last access and only refresh it if data is either not
present or the expiration time has be passed.
expirationDelayMs - The expiration delay in milliseconds.
Use DEFAULT_EXPIRATION_PERIOD_MS by default.logger - A non-null object to log messages. TODO change to an ITaskMonitor
to be able to update the caller's progress bar UI, if any.
SdkSourcesprotected com.android.sdklib.internal.repository.DownloadCache getDownloadCache()
DownloadCache
Extracted so that we can override this in unit tests.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||