Interface DIManagers

All Superinterfaces:
AdminAware, Iterable<DIManager>
All Known Subinterfaces:
InternalDIManagers
All Known Implementing Classes:
DefaultDIManagers

public interface DIManagers extends AdminAware, Iterable<DIManager>
Holds all the currently discovered DIManagers.

Provides simple means to get all the current DI-Managers, as well as registering for lifecycle (added and removed) events.

  • Method Details

    • getManagers

      DIManager[] getManagers()
      Returns all the currently discovered DI-Managers.
    • getManagerByUID

      DIManager getManagerByUID(String uid)
      Returns a DI-Manager based on its uid.
      See Also:
    • getUids

      Map<String, DIManager> getUids()
      Returns a map of DI-Manager with the key as the uid.
    • getSize

      int getSize()
      Returns the number of DI-Managers currently discovered.
    • isEmpty

      boolean isEmpty()
      Returns true if there are no DI-Managers, false otherwise.
    • waitForAtLeastOne

      DIManager waitForAtLeastOne()
      Waits indefinitely till at least one DI-Manager is discovered and returns it.
    • waitForAtLeastOne

      DIManager waitForAtLeastOne(long timeout, TimeUnit timeUnit)
      Waits for the given timeout (in time unit) till at least one DI-Manager is discovered and returns it.
    • waitFor

      boolean waitFor(int numberOfDIManagers)
      Waits indefinitely till the provided number of DI-Managers are up. When passing 0, will wait till there are no more DI-Managers.
    • waitFor

      boolean waitFor(int numberOfDIManagers, long timeout, TimeUnit timeUnit)
      Waits for the given timeout (in time unit) till the provided number of DI-Managers are up.
    • getDIManagerAdded

      DIManagerAddedEventManager getDIManagerAdded()
      Returns the DI-Manager added event manager allowing to add and remove DIManagerAddedEventListeners.
    • getDIManagerRemoved

      DIManagerRemovedEventManager getDIManagerRemoved()
      Returns the DI-Manager removed event manager allowing to add and remove DIManagerRemovedEventListeners.
    • addLifecycleListener

      void addLifecycleListener(DIManagerLifecycleEventListener eventListener)
    • removeLifecycleListener

      void removeLifecycleListener(DIManagerLifecycleEventListener eventListener)