org.apache.directory.api.util
Class AbstractSimpleComponentsMonitor

java.lang.Object
  extended by org.apache.directory.api.util.AbstractSimpleComponentsMonitor
All Implemented Interfaces:
ComponentsMonitor
Direct Known Subclasses:
MandatoryComponentsMonitor, OptionalComponentsMonitor

public abstract class AbstractSimpleComponentsMonitor
extends Object
implements ComponentsMonitor

Abstract implementation of a components monitor.

Author:
Apache Directory Project

Constructor Summary
AbstractSimpleComponentsMonitor(String[] components)
          Instantiates a new abstract simple components monitor.
 
Method Summary
 boolean allComponentsUsed()
          Check if all components are used.
 List<String> getRemainingComponents()
          Gets the remaining components.
 ComponentsMonitor useComponent(String component)
          Use a component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.api.util.ComponentsMonitor
finalStateValid
 

Constructor Detail

AbstractSimpleComponentsMonitor

public AbstractSimpleComponentsMonitor(String[] components)
Instantiates a new abstract simple components monitor.

Parameters:
components - the components
Method Detail

useComponent

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

Specified by:
useComponent in interface ComponentsMonitor
Parameters:
component - the component
Returns:
this components monitor
Throws:
IllegalArgumentException - if the component is already used

allComponentsUsed

public boolean allComponentsUsed()
Check if all components are used.

Specified by:
allComponentsUsed in interface ComponentsMonitor
Returns:
true if all components are used

getRemainingComponents

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

Specified by:
getRemainingComponents in interface ComponentsMonitor
Returns:
the remaining components


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