

Public Member Functions | |
| BlockingComponentListener (Logger logger) | |
| boolean | includeForeignComponents () |
| synchronized void | componentsAvailable (List< ComponentDescriptor > comps) |
| synchronized void | componentsUnavailable (List< String > compNames) |
| synchronized void | clearAndExpect (int nCalls) |
| boolean | awaitNotifications (long timeout, TimeUnit unit) throws InterruptedException |
Package Functions | |
| List< ComponentDescriptor > | getAllCompsAvailable () |
| List< String > | getAllCompNamesUnavailable () |
Private Attributes | |
| final Logger | logger |
| final List< ComponentDescriptor > | allCompsAvailable |
| final List< String > | allCompNamesUnavailable |
| volatile CountDownLatch | sync |
Test helper class that allows to wait until notification about unexpected component (un)availability has been received.
| alma::acs::container::BlockingComponentListener::BlockingComponentListener | ( | Logger | logger | ) | [inline] |
References allCompNamesUnavailable, and allCompsAvailable.
| boolean alma::acs::container::BlockingComponentListener::awaitNotifications | ( | long | timeout, | |
| TimeUnit | unit | |||
| ) | throws InterruptedException [inline] |
Waits until nCalls notifications have been received since the call to clearAndExpect(nCalls).
References sync.
Referenced by alma::acs::container::ComponentTestclient::testComponentListening().
| synchronized void alma::acs::container::BlockingComponentListener::clearAndExpect | ( | int | nCalls | ) | [inline] |
References allCompNamesUnavailable, allCompsAvailable, and sync.
Referenced by alma::acs::container::ComponentTestclient::testComponentListening().
| synchronized void alma::acs::container::BlockingComponentListener::componentsAvailable | ( | List< ComponentDescriptor > | comps | ) | [inline] |
Called when components become available
Implements alma::acs::container::ContainerServices::ComponentListener.
References allCompsAvailable, logger, and sync.
| synchronized void alma::acs::container::BlockingComponentListener::componentsUnavailable | ( | List< String > | compNames | ) | [inline] |
Called when components become unavailable
Implements alma::acs::container::ContainerServices::ComponentListener.
References allCompNamesUnavailable, logger, and sync.
| List<String> alma::acs::container::BlockingComponentListener::getAllCompNamesUnavailable | ( | ) | [inline, package] |
References allCompNamesUnavailable.
Referenced by alma::acs::container::ComponentTestclient::testComponentListening().
| List<ComponentDescriptor> alma::acs::container::BlockingComponentListener::getAllCompsAvailable | ( | ) | [inline, package] |
References allCompsAvailable.
Referenced by alma::acs::container::ComponentTestclient::testComponentListening().
| boolean alma::acs::container::BlockingComponentListener::includeForeignComponents | ( | ) | [inline] |
Called to find out whether a filter should be applied such that only notifications arrive for components to which the caller holds a reference.
Implements alma::acs::container::ContainerServices::ComponentListener.
final List<String> alma::acs::container::BlockingComponentListener::allCompNamesUnavailable [private] |
Referenced by BlockingComponentListener(), clearAndExpect(), componentsUnavailable(), and getAllCompNamesUnavailable().
final List<ComponentDescriptor> alma::acs::container::BlockingComponentListener::allCompsAvailable [private] |
Referenced by BlockingComponentListener(), clearAndExpect(), componentsAvailable(), and getAllCompsAvailable().
final Logger alma::acs::container::BlockingComponentListener::logger [private] |
Referenced by componentsAvailable(), and componentsUnavailable().
volatile CountDownLatch alma::acs::container::BlockingComponentListener::sync [private] |
Referenced by awaitNotifications(), clearAndExpect(), componentsAvailable(), and componentsUnavailable().
1.6.2