public interface OfflineController
void checkOffline(RepositorySystemSession session, RemoteRepository repository) throws RepositoryOfflineException
RepositoryOfflineExceptionto block all remote repository access when in offline mode. More sophisticated implementations might inspect
configuration propertiesof 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 stateis irrelevant to the outcome of the check.
session- The repository session during which the check is made, must not be
repository- The remote repository to check for offline access, must not be
RepositoryOfflineException- If the repository is not accessible in offline mode. If the method returns normally, the repository is considered accessible even in offline mode.
Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.