@Named public class DefaultOfflineController extends Object implements OfflineController, org.eclipse.aether.spi.locator.Service
| Constructor and Description |
|---|
DefaultOfflineController() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkOffline(org.eclipse.aether.RepositorySystemSession session,
org.eclipse.aether.repository.RemoteRepository repository)
Determines whether the specified repository is accessible if the system was in offline mode.
|
void |
initService(org.eclipse.aether.spi.locator.ServiceLocator locator) |
DefaultOfflineController |
setLoggerFactory(org.eclipse.aether.spi.log.LoggerFactory loggerFactory) |
public void initService(org.eclipse.aether.spi.locator.ServiceLocator locator)
initService in interface org.eclipse.aether.spi.locator.Servicepublic DefaultOfflineController setLoggerFactory(org.eclipse.aether.spi.log.LoggerFactory loggerFactory)
public void checkOffline(org.eclipse.aether.RepositorySystemSession session,
org.eclipse.aether.repository.RemoteRepository repository)
throws org.eclipse.aether.transfer.RepositoryOfflineException
OfflineControllerRepositoryOfflineException to block all remote repository
access when in offline mode. More sophisticated implementations might inspect
configuration properties of the session to check for some
kind of whitelist that allows certain remote repositories even when offline. At any rate, the session's current
offline state is irrelevant to the outcome of the check.checkOffline in interface OfflineControllersession - The repository session during which the check is made, must not be null.repository - The remote repository to check for offline access, must not be null.org.eclipse.aether.transfer.RepositoryOfflineException - If the repository is not accessible in offline mode. If the method returns
normally, the repository is considered accessible even in offline mode.RepositorySystemSession.isOffline()Copyright © 2010-2015 The Eclipse Foundation. All Rights Reserved.