Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::container::BlockingComponentListener Class Reference

Inheritance diagram for alma::acs::container::BlockingComponentListener:

Inheritance graph
[legend]
Collaboration diagram for alma::acs::container::BlockingComponentListener:

Collaboration graph
[legend]
List of all members.

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< ComponentDescriptorgetAllCompsAvailable ()
List< String > getAllCompNamesUnavailable ()

Private Attributes

final Logger logger
final List< ComponentDescriptorallCompsAvailable
final List< String > allCompNamesUnavailable
volatile CountDownLatch sync

Detailed Description

Test helper class that allows to wait until notification about unexpected component (un)availability has been received.
Author:
hsommer


Constructor & Destructor Documentation

alma::acs::container::BlockingComponentListener::BlockingComponentListener Logger  logger  )  [inline]
 


Member Function Documentation

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).

Returns:
true if the calls were received before the timeout (see CountDownLatch#await(long, TimeUnit).

synchronized void alma::acs::container::BlockingComponentListener::clearAndExpect int  nCalls  )  [inline]
 

synchronized void alma::acs::container::BlockingComponentListener::componentsAvailable List< ComponentDescriptor comps  )  [inline]
 

Called when components become available

Implements alma::acs::container::ContainerServices::ComponentListener.

synchronized void alma::acs::container::BlockingComponentListener::componentsUnavailable List< String >  compNames  )  [inline]
 

Called when components become unavailable

Implements alma::acs::container::ContainerServices::ComponentListener.

List<String> alma::acs::container::BlockingComponentListener::getAllCompNamesUnavailable  )  [inline, package]
 

List<ComponentDescriptor> alma::acs::container::BlockingComponentListener::getAllCompsAvailable  )  [inline, package]
 

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.


Member Data Documentation

final List<String> alma::acs::container::BlockingComponentListener::allCompNamesUnavailable [private]
 

final List<ComponentDescriptor> alma::acs::container::BlockingComponentListener::allCompsAvailable [private]
 

final Logger alma::acs::container::BlockingComponentListener::logger [private]
 

volatile CountDownLatch alma::acs::container::BlockingComponentListener::sync [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:52:30 2009 for ACS Java API by doxygen 1.3.8