org.apache.directory.shared.util
Interface ComponentsMonitor

All Known Implementing Classes:
AbstractSimpleComponentsMonitor, MandatoryAndOptionalComponentsMonitor, MandatoryComponentsMonitor, OptionalComponentsMonitor

public interface ComponentsMonitor

Monitor used to track existence or duplication of components.

Author:
Apache Directory Project

Method Summary
 boolean allComponentsUsed()
          Check if all components are used.
 boolean finalStateValid()
          Checks if the final state is valid.
 List<String> getRemainingComponents()
          Gets the remaining components.
 ComponentsMonitor useComponent(String component)
          Use a component.
 

Method Detail

useComponent

ComponentsMonitor useComponent(String component)
                               throws IllegalArgumentException
Use a component.

Parameters:
component - the component
Returns:
this components monitor
Throws:
IllegalArgumentException - if the component is already used

allComponentsUsed

boolean allComponentsUsed()
Check if all components are used.

Returns:
true if all components are used

finalStateValid

boolean finalStateValid()
Checks if the final state is valid. That depends whether the components are mandatory or optional.

Returns:
true if the final state is valid

getRemainingComponents

List<String> getRemainingComponents()
Gets the remaining components.

Returns:
the remaining components


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.