org.eclipse.aether.internal.impl

## Class DefaultOfflineController

- java.lang.Object
- - org.eclipse.aether.internal.impl.DefaultOfflineController

- All Implemented Interfaces:
    OfflineController, Service

      @Named
      public class DefaultOfflineController
      extends Object
      implements OfflineController, Service

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultOfflineController()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkOffline(RepositorySystemSession session, RemoteRepository repository)` Determines whether the specified repository is accessible if the system was in offline mode.
    `void` | `initService(ServiceLocator locator)` Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.
    `DefaultOfflineController` | `setLoggerFactory(LoggerFactory loggerFactory)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultOfflineController

          public DefaultOfflineController()

  - ### Method Detail

    - #### initService

          public void initService(ServiceLocator locator)

      Description copied from interface: `Service`
      Provides the opportunity to initialize this service and to acquire other services for its operation from the locator. A service must not save the reference to the provided service locator.
      Specified by:
        `initService` in interface `Service`
      Parameters:
        `locator` - The service locator, must not be `null`.

    - #### setLoggerFactory

          public DefaultOfflineController setLoggerFactory(LoggerFactory loggerFactory)

    - #### 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 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.
      Specified by:
        `checkOffline` in interface `OfflineController`
      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:
        `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()`

Copyright © 2010-2014 The Eclipse Foundation. All Rights Reserved.