Interface DIManagers
- All Superinterfaces:
AdminAware, Iterable<DIManager>
- All Known Subinterfaces:
InternalDIManagers
- All Known Implementing Classes:
DefaultDIManagers
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 Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(DIManagerLifecycleEventListener eventListener) Allows to add aDIManagerLifecycleEventListener.Returns the DI-Manager added event manager allowing to add and removeDIManagerAddedEventListeners.Returns the DI-Manager removed event manager allowing to add and removeDIManagerRemovedEventListeners.getManagerByUID(String uid) Returns a DI-Manager based on its uid.Returns all the currently discovered DI-Managers.intgetSize()Returns the number of DI-Managers currently discovered.getUids()Returns a map of DI-Manager with the key as the uid.booleanisEmpty()Returnstrueif there are no DI-Managers,falseotherwise.voidremoveLifecycleListener(DIManagerLifecycleEventListener eventListener) Allows to remove aDIManagerLifecycleEventListener.booleanwaitFor(int numberOfDIManagers) Waits indefinitely till the provided number of DI-Managers are up.booleanWaits for the given timeout (in time unit) till the provided number of DI-Managers are up.Waits indefinitely till at least one DI-Manager is discovered and returns it.waitForAtLeastOne(long timeout, TimeUnit timeUnit) Waits for the given timeout (in time unit) till at least one DI-Manager is discovered and returns it.Methods inherited from interface AdminAware
getAdminMethods inherited from interface Iterable
forEach, iterator, spliterator
-
Method Details
-
getManagers
DIManager[] getManagers()Returns all the currently discovered DI-Managers. -
getManagerByUID
-
getUids
-
getSize
int getSize()Returns the number of DI-Managers currently discovered. -
isEmpty
boolean isEmpty()Returnstrueif there are no DI-Managers,falseotherwise. -
waitForAtLeastOne
DIManager waitForAtLeastOne()Waits indefinitely till at least one DI-Manager is discovered and returns it. -
waitForAtLeastOne
-
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
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 removeDIManagerAddedEventListeners. -
getDIManagerRemoved
DIManagerRemovedEventManager getDIManagerRemoved()Returns the DI-Manager removed event manager allowing to add and removeDIManagerRemovedEventListeners. -
addLifecycleListener
Allows to add aDIManagerLifecycleEventListener. -
removeLifecycleListener
Allows to remove aDIManagerLifecycleEventListener.
-