Package org.eclipse.aether.internal.impl
Class DefaultOfflineController
- java.lang.Object
-
- org.eclipse.aether.internal.impl.DefaultOfflineController
-
- All Implemented Interfaces:
OfflineController
@Named public class DefaultOfflineController extends Object implements OfflineController
-
-
Constructor Summary
Constructors Constructor Description DefaultOfflineController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkOffline(RepositorySystemSession session, RemoteRepository repository)
Determines whether the specified repository is accessible if the system was in offline mode.
-
-
-
Constructor Detail
-
DefaultOfflineController
public DefaultOfflineController()
-
-
Method Detail
-
checkOffline
public void checkOffline(RepositorySystemSession session, RemoteRepository repository) throws RepositoryOfflineException
Description copied from interface:OfflineController
Determines whether the specified repository is accessible if the system was in offline mode. A simple implementation might unconditionally throwRepositoryOfflineException
to block all remote repository access when in offline mode. More sophisticated implementations might inspectconfiguration 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 currentoffline state
is irrelevant to the outcome of the check.- Specified by:
checkOffline
in interfaceOfflineController
- Parameters:
session
- The repository session during which the check is made, must not benull
.repository
- The remote repository to check for offline access, must not benull
.- Throws:
RepositoryOfflineException
- If the repository is not accessible in offline mode. If the method returns normally, the repository is considered accessible even in offline mode.- See Also:
RepositorySystemSession.isOffline()
-
-