org.apache.avalon.composition.model
Interface ModelSelector


public interface ModelSelector

Interface implemented by a service selection implementation mechanism. Classes implementing the selector interface may be activated during the selection of candidate service providers in an automated assembly process. A component author may declare a selection class explicitly via a service dependency attribute with the attribute name of urn:avalon:profile.selector (but this will change to a model driven approach).

Version:
$Revision: 1.5 $ $Date: 2004/02/21 23:54:42 $
Author:
Avalon Development Team

Method Summary
 DeploymentModel select(DeploymentModel[] models, DependencyDescriptor dependency)
          Returns the preferred model from an available selection of candidates capable of fulfilling a supplied service dependency.
 DeploymentModel select(DeploymentModel[] models, ReferenceDescriptor reference)
          Returns the preferred model from an available selection of candidates
 DeploymentModel select(DeploymentModel[] models, StageDescriptor stage)
          Returns the preferred model from an available selection of candidates
 

Method Detail

select

public DeploymentModel select(DeploymentModel[] models,
                              DependencyDescriptor dependency)
Returns the preferred model from an available selection of candidates capable of fulfilling a supplied service dependency.

Parameters:
models - the set of candidate models
dependency - a service dependency
Returns:
the preferred model or null if no satisfactory provider can be established

select

public DeploymentModel select(DeploymentModel[] models,
                              StageDescriptor stage)
Returns the preferred model from an available selection of candidates

Parameters:
models - the set of candidate models
stage - the stage dependency
Returns:
the preferred provider or null if no satisfactory provider can be established

select

public DeploymentModel select(DeploymentModel[] models,
                              ReferenceDescriptor reference)
Returns the preferred model from an available selection of candidates

Parameters:
models - the set of candidate models
reference - the versioned service reference
Returns:
the preferred provider or null if no satisfactory provider can be established


Copyright © The Apache Software Foundation. All Rights Reserved.