Interface OfflineController

  • All Known Implementing Classes:
    DefaultOfflineController

    public interface OfflineController
    Determines whether a remote repository is accessible in offline mode.
    Restriction:
    This interface is not intended to be extended by clients.
    Restriction:
    This interface is not intended to be implemented by clients.
    Provisional:
    This type is provisional and can be changed, moved or removed without prior notice.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.
    • Method Detail

      • checkOffline

        void checkOffline​(org.eclipse.aether.RepositorySystemSession session,
                          org.eclipse.aether.repository.RemoteRepository repository)
                   throws org.eclipse.aether.transfer.RepositoryOfflineException
        Determines whether the specified repository is accessible if the system was in offline mode. A simple implementation might unconditionally throw RepositoryOfflineException 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.
        Parameters:
        session - 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.
        Throws:
        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.
        See Also:
        RepositorySystemSession.isOffline()